:root {
  color-scheme: dark;
  --bg: #121214;
  --bg-elev: #1c1c20;
  --bg-elev-2: #25252b;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f3efe6;
  --muted: #9b968c;
  --accent: #d4a574;
  --accent-dim: rgba(212, 165, 116, 0.16);
  --select: #7eb8c9;
  --select-glow: rgba(126, 184, 201, 0.35);
  --paper: #fffcf7;
  --danger: #e07a5f;
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.5);
  --topbar-bg: linear-gradient(180deg, #1a1a1e 0%, #141416 100%);
  --sidebar-bg: #161618;
  --workspace-bg: #101012;
  --workspace-glow: rgba(212, 165, 116, 0.07);
  --toast-bg: #2a2a30;
  --drop-veil-bg: rgba(16, 16, 18, 0.72);
  --ruler: #6e6a64;
  --ruler-tick: #4a4743;
  --sheet-ring: rgba(255, 255, 255, 0.04);
  --brand-inset: rgba(255, 255, 255, 0.12);
  --font: "Outfit", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Segoe UI", system-ui, sans-serif;
  --serif: "Fraunces", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Times New Roman", serif;
  --sidebar: 30%;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f3eee6;
  --bg-elev: #fffcf7;
  --bg-elev-2: #ebe4d8;
  --line: rgba(48, 40, 32, 0.08);
  --line-strong: rgba(48, 40, 32, 0.16);
  --text: #2a241c;
  --muted: #7a7268;
  --accent: #c4925a;
  --accent-dim: rgba(196, 146, 90, 0.2);
  --select: #3d8a9c;
  --select-glow: rgba(61, 138, 156, 0.28);
  --shadow: 0 24px 50px rgba(80, 60, 40, 0.14);
  --topbar-bg: linear-gradient(180deg, #fffcf7 0%, #f3eee6 100%);
  --sidebar-bg: #f7f1e8;
  --workspace-bg: #e8e0d4;
  --workspace-glow: rgba(212, 165, 116, 0.2);
  --toast-bg: #fffcf7;
  --drop-veil-bg: rgba(243, 238, 230, 0.78);
  --ruler: #8a8278;
  --ruler-tick: #b4aba0;
  --sheet-ring: rgba(40, 32, 24, 0.06);
  --brand-inset: rgba(40, 32, 24, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

h1,
h2,
p {
  margin: 0;
}

.app {
  min-height: 100dvh;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, var(--sidebar)) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
}

.topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--topbar-bg);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 180px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, #d4a574 0 33%, #7eb8c9 33% 66%, #e07a5f 66%);
  box-shadow: inset 0 0 0 1px var(--brand-inset);
}

.brand h1 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 560;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.brand p {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar-meta {
  flex: 1;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn {
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
  padding: 8px 12px;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.btn.primary {
  background: var(--accent);
  color: #1a120c;
  font-weight: 600;
}

.btn.primary:hover {
  filter: brightness(1.06);
}

.btn.ghost {
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
}

.btn.ghost:hover,
.btn.tiny:hover {
  background: var(--bg-elev-2);
}

.btn.wide {
  width: 100%;
}

.btn.grow {
  flex: 1;
}

.btn.lang,
.btn.theme {
  min-width: 40px;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
}

.btn.lang {
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

.btn.theme {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

.btn.theme svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn.theme .icon-moon {
  display: none;
}

html[data-theme="light"] .btn.theme .icon-sun {
  display: none;
}

html[data-theme="light"] .btn.theme .icon-moon {
  display: block;
}

html[lang="zh-Hant"] .brand p,
html[lang="zh-Hant"] .guide-kicker,
html[lang="zh-Hant"] .guide h3,
html[lang="zh-Hant"] .topbar-meta,
html[lang="zh-Hant"] .photo-empty span {
  letter-spacing: 0.04em;
  text-transform: none;
}

.btn.tiny {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  font-size: 12px;
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}

.btn:focus-visible,
.swatch:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--select);
  outline-offset: 2px;
}

.sidebar {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0;
  border-right: 1px solid var(--line);
  background: var(--sidebar-bg);
  overflow: auto;
}

.guide {
  padding: 22px 20px 28px;
}

.guide-kicker {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.guide h2 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 10px;
}

.guide-lead {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 22px;
}

.guide section {
  margin-bottom: 18px;
}

.guide h3 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
}

.guide ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 16px;
}

.guide li + li {
  margin-top: 5px;
}

.guide strong {
  color: var(--text);
  font-weight: 600;
}

.guide-keys {
  margin: 0;
  display: grid;
  gap: 8px;
}

.guide-keys div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px;
  align-items: baseline;
}

.guide-keys dt {
  margin: 0;
  color: var(--text);
  font-size: 14px;
}

.guide-keys dd {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

kbd {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--line-strong);
  background: var(--bg-elev);
  font-family: var(--font);
  font-size: 13px;
  color: var(--text);
}

.photo-tools {
  width: min(520px, calc(100% - 32px));
  margin: 0 auto 4px;
  padding: 10px 12px 12px;
  border-radius: 12px;
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
}

.panel {
  padding: 14px 12px 16px;
  border-bottom: 1px solid var(--line);
}

.panel:last-child {
  border-bottom: 0;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 8px;
}

.panel-actions {
  display: flex;
  gap: 6px;
}

.panel h2 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.panel-head h2 {
  margin-bottom: 0;
}

.thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  border: 1px dashed var(--line-strong);
  background: var(--bg-elev);
  overflow: hidden;
  cursor: pointer;
  padding: 0;
}

.thumb.has-image {
  border-style: solid;
}

.thumb.is-on {
  border-color: var(--select);
  box-shadow: 0 0 0 3px var(--select-glow);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb-num {
  position: absolute;
  left: 5px;
  top: 4px;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.thumb.empty .thumb-num {
  color: var(--muted);
  text-shadow: none;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 16px;
}

.hint,
.empty-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

.field {
  margin-bottom: 12px;
}

.field-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.field label,
.check {
  font-size: 14px;
  color: var(--text);
}

.readout {
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  font-size: 14px;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.unit-input {
  display: flex;
  align-items: center;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.unit-input input,
select,
#bg-color {
  width: 100%;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
}

.unit-input input {
  border: 0;
  border-radius: 0;
  min-width: 0;
}

.unit-input span {
  padding: 0 10px 0 0;
  color: var(--muted);
  font-size: 12px;
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 99px;
  background: var(--bg-elev-2);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #1a120c;
  cursor: grab;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  cursor: pointer;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.swatches {
  display: flex;
  gap: 8px;
  align-items: center;
}

.swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
  background: var(--swatch, #fff);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
}

.swatch.is-on {
  border-color: var(--select);
}

.swatch[data-bg="#fffcf7"] { --swatch: #fffcf7; }
.swatch[data-bg="#ffffff"] { --swatch: #ffffff; }
.swatch[data-bg="#e8e4dc"] { --swatch: #e8e4dc; }
.swatch[data-bg="#111111"] { --swatch: #111111; }

.swatch.custom {
  overflow: hidden;
  position: relative;
  background: conic-gradient(
    from 90deg,
    #e07a5f,
    #d4a574,
    #7aad7a,
    #7eb8c9,
    #9b8ec4,
    #e07a5f
  );
}

.swatch.custom input {
  position: absolute;
  inset: -4px;
  opacity: 0;
  cursor: pointer;
}

.workspace {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(1200px 500px at 70% 0%, var(--workspace-glow), transparent 50%),
    var(--workspace-bg);
}

.app.is-choosing .workspace {
  grid-template-rows: minmax(0, 1fr);
}

.app.is-choosing .stage,
.app.is-choosing .photo-tools,
.app.is-choosing .status,
.app.is-choosing #btn-print,
.app.is-choosing #btn-download,
.app.is-choosing #btn-change-style {
  display: none !important;
}

.app:not(.is-choosing) .style-chooser {
  display: none;
}

.style-chooser {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  display: grid;
  place-items: center;
  padding: 28px 24px;
}

.style-chooser-inner {
  width: min(720px, 100%);
}

.style-chooser h2 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 10px;
}

.style-chooser-lead {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 22px;
}

.style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 168px));
  gap: 16px;
  justify-content: start;
}

.style-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--line-strong);
  background: var(--bg-elev);
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  color: inherit;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.style-card:hover {
  background: var(--bg-elev-2);
}

.style-card.is-on,
.style-card:focus-visible {
  border-color: var(--select);
  box-shadow: 0 0 0 3px var(--select-glow);
}

.style-card-preview {
  position: relative;
  aspect-ratio: 4 / 6;
  border-radius: 8px;
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.style-card-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
}

.style-card-ov {
  z-index: 1;
}

.style-card-name {
  font-size: 14px;
  font-weight: 600;
  padding: 0 4px 4px;
}

.stage {
  min-width: 0;
  min-height: 0;
  width: 100%;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 18px 22px 8px;
}

.stage-frame {
  display: grid;
  grid-template-columns: 28px minmax(0, auto);
  grid-template-rows: 22px auto;
  max-width: 100%;
  max-height: 100%;
  min-width: 0;
}

.ruler-corner {
  background: transparent;
}

.ruler {
  position: relative;
  color: var(--ruler);
  font-size: 9px;
  letter-spacing: 0.04em;
  user-select: none;
}

.ruler-h {
  display: flex;
}

.ruler-v {
  display: flex;
  flex-direction: column;
}

.tick {
  position: relative;
  flex: 1;
}

.tick::before {
  content: "";
  position: absolute;
  background: var(--ruler-tick);
}

.ruler-h .tick::before {
  left: 0;
  top: 12px;
  width: 1px;
  height: 8px;
}

.ruler-h .tick:nth-child(odd)::before {
  height: 5px;
  top: 15px;
}

.ruler-v .tick::before {
  top: 0;
  right: 0;
  height: 1px;
  width: 8px;
}

.ruler-v .tick:nth-child(odd)::before {
  width: 5px;
}

.tick span {
  position: absolute;
}

.ruler-h .tick span {
  left: 3px;
  top: 0;
}

.ruler-v .tick span {
  right: 10px;
  top: 2px;
}

.sheet-wrap {
  position: relative;
  min-width: 0;
  pointer-events: none;
}

.sheet {
  position: relative;
  background: transparent;
  overflow: hidden;
  box-shadow: var(--shadow), 0 0 0 1px var(--sheet-ring);
  touch-action: none;
  cursor: default;
  min-width: 0;
  z-index: 1;
  pointer-events: auto;
}

.sheet:focus {
  outline: none;
}

.sheet-background,
.sheet-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.sheet-background {
  z-index: 0;
}

.sheet-overlay {
  z-index: 30;
}

.sheet-controls {
  position: absolute;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}

.photo {
  position: absolute;
  overflow: hidden;
  background: transparent;
  cursor: grab;
  user-select: none;
}

.photo.is-empty {
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
}

.photo.is-oval {
  overflow: visible;
  border-radius: 50%;
}

.photo.is-oval .photo-media,
.photo.is-oval .photo-empty {
  border-radius: 50%;
}

.photo.is-on {
  z-index: 10;
  outline: 2px solid var(--select);
  outline-offset: -1px;
  box-shadow: 0 0 0 3px var(--select-glow);
  cursor: grab;
}

.photo.is-on:not(.is-empty) {
  overflow: visible;
}

.photo.is-dragging {
  cursor: grabbing;
}

.photo-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.photo-media img {
  position: absolute;
  max-width: none;
  transform-origin: center center;
  pointer-events: none;
  -webkit-user-drag: none;
}

.photo-empty {
  position: absolute;
  inset: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  text-align: center;
  color: #42a2ea;
  font-weight: 700;
  pointer-events: none;
}

.photo-empty strong {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: #42a2ea;
  line-height: 1;
}

.photo-empty span {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.app[data-style="halloween"] .photo-empty > div {
  position: absolute;
  left: 50%;
  top: 53%;
  transform: translate(-50%, -50%);
}

.handles {
  display: none;
}

.photo.is-on:not(.is-empty) .handles {
  display: block;
}

.handles::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 1px rgba(18, 18, 20, 0.45);
  pointer-events: none;
}

.handle {
  position: absolute;
  width: 18px;
  height: 18px;
  background: transparent;
  border: 0;
  border-radius: 0;
  z-index: 3;
  filter: drop-shadow(0 0 1px #121214) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
}

.handle::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border: 3px solid #f4f1ea;
  pointer-events: none;
}

.handle::after {
  content: "";
  position: absolute;
  inset: -10px;
}

.handle.nw { left: 7px; top: 7px; cursor: nwse-resize; }
.handle.ne { right: 7px; top: 7px; cursor: nesw-resize; }
.handle.sw { left: 7px; bottom: 7px; cursor: nesw-resize; }
.handle.se { right: 7px; bottom: 7px; cursor: nwse-resize; }
.handle.rotate {
  left: 50%;
  top: -34px;
  transform: translateX(-50%);
  cursor: grab;
}

.handle.nw::before { border-right: 0; border-bottom: 0; top: 0; left: 0; }
.handle.ne::before { border-left: 0; border-bottom: 0; top: 0; right: 0; }
.handle.sw::before { border-right: 0; border-top: 0; bottom: 0; left: 0; }
.handle.se::before { border-left: 0; border-top: 0; bottom: 0; right: 0; }
.handle.rotate::before {
  width: 14px;
  height: 14px;
  left: 2px;
  top: 2px;
  border: 3px solid #f4f1ea;
  border-radius: 50%;
  background: var(--select);
}

.handle.rotate::after {
  inset: -12px;
}

.handles::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -16px;
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 1px rgba(18, 18, 20, 0.35);
  pointer-events: none;
}

.photo.is-on .handle:hover::before,
.photo.is-resizing .handle::before,
.photo.is-rotating .handle.rotate::before,
.photo-controls .handle:hover::before,
.photo-controls.is-resizing .handle::before,
.photo-controls.is-rotating .handle.rotate::before {
  border-color: var(--select);
}

.photo.is-resizing {
  cursor: nwse-resize;
}

.photo.is-rotating,
.photo-controls.is-rotating .handle.rotate {
  cursor: grabbing;
}

.photo-controls {
  position: absolute;
  pointer-events: none;
}

.photo-controls .handles {
  display: block;
}

.photo-controls.is-oval {
  border-radius: 50%;
}

.photo-controls .handle {
  pointer-events: auto;
}

.file-input {
  position: fixed;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.status {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  padding: 6px 16px 14px;
}

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--toast-bg);
  border: 1px solid var(--line-strong);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  z-index: 40;
}

.drop-veil {
  position: fixed;
  inset: 0;
  background: var(--drop-veil-bg);
  display: grid;
  place-items: center;
  z-index: 30;
  pointer-events: none;
}

.drop-veil p {
  padding: 18px 28px;
  border: 1px dashed var(--accent);
  border-radius: 16px;
  background: var(--accent-dim);
  font-size: 16px;
}

body.is-dropping .drop-veil {
  display: grid;
}

.drop-veil[hidden] {
  display: none;
}

@media (max-width: 900px) {
  .app {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(52vh, 1fr) auto;
  }

  .workspace {
    grid-row: 2;
    min-width: 0;
  }

  .sidebar {
    grid-row: 3;
    border-right: 0;
    border-top: 1px solid var(--line);
    max-height: 48vh;
  }

  .stage {
    padding: 8px 10px 4px;
  }

  .topbar-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .topbar {
    flex-wrap: wrap;
    gap: 10px;
  }

  .topbar-meta {
    order: 3;
    flex-basis: 100%;
  }

  .brand p {
    display: none;
  }
}

@media print {
  @page {
    size: 4in 6in;
    margin: 0;
  }

  html,
  body {
    background: white;
    width: 4in;
    height: 6in;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .topbar,
  .sidebar,
  .status,
  .photo-tools,
  .style-chooser,
  .toast,
  .drop-veil,
  .ruler,
  .ruler-corner,
  .sheet-controls,
  .handles,
  .photo-empty {
    display: none !important;
  }

  .app,
  .workspace,
  .stage,
  .stage-frame,
  .sheet-wrap {
    display: block;
    padding: 0;
    margin: 0;
    width: 4in;
    height: 6in;
    max-width: none;
    max-height: none;
    background: transparent;
    box-shadow: none;
  }

  .sheet,
  .sheet-background,
  .sheet-overlay {
    position: absolute;
    inset: 0;
    width: 4in !important;
    height: 6in !important;
    box-shadow: none;
    overflow: hidden;
  }

  .sheet-background {
    z-index: 0;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .sheet-overlay {
    z-index: 30;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}

body.is-portrait {
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}
