:root {
  color-scheme: light;
  --ink: #332f29;
  --text: #3f3931;
  --muted: #6f665a;
  --subtle: #938778;
  --paper: #ded4c1;
  --cream: #cec2ad;
  --cream-deep: #b7a990;
  --sky: #74583b;
  --sky-dark: #4c3c2d;
  --sky-soft: #b4a189;
  --orange: #9c7749;
  --orange-dark: #694e32;
  --acid: #b8a27d;
  --line: #9e907a;
  --line-dark: rgba(51, 47, 41, .25);
  --display: "Bodoni 72 Smallcaps", "Bodoni 72", "Cochin", "Songti SC", serif;
  --body: "Cochin", "Iowan Old Style", "Songti SC", "STSong", serif;
  --mono: "American Typewriter", "Courier New", monospace;
  --shadow: 0 24px 55px rgba(33, 25, 19, .38), 0 5px 12px rgba(33, 25, 19, .2);
}

* { box-sizing: border-box; }

html, body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 8%, rgba(255,255,255,.18), transparent 28%),
    var(--cream);
  color: var(--text);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--acid);
  outline-offset: 2px;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 100;
  opacity: .075;
  mix-blend-mode: multiply;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

.app-shell {
  display: grid;
  grid-template-rows: 76px minmax(0, 1fr);
  height: 100vh;
  min-height: 650px;
}

.topbar {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) auto;
  align-items: center;
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  padding: 0 22px;
  border-right: 1px solid var(--ink);
  color: var(--ink);
  text-decoration: none;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .12em;
}

.brand small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font: 7px/1.2 var(--mono);
  letter-spacing: .08em;
}

.brand-mark {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 9px;
  background: var(--orange);
  box-shadow: 2px 2px 0 var(--ink);
  transform: rotate(-4deg);
  transition: transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s ease;
}

.brand:hover .brand-mark {
  transform: rotate(3deg) translateY(-1px);
  box-shadow: 3px 4px 0 var(--ink);
}

.brand-mark svg {
  width: 29px;
  height: 29px;
  overflow: visible;
  fill: var(--acid);
  stroke: var(--ink);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.4;
}

.brand-mark .photo-front { fill: var(--paper); }
.brand-mark circle { fill: var(--acid); }

.file-meta {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--cream);
  color: var(--muted);
  font: 8px var(--mono);
  letter-spacing: .035em;
  text-transform: uppercase;
  white-space: nowrap;
}

.file-meta strong {
  max-width: 180px;
  overflow: hidden;
  color: var(--ink);
  font-weight: 650;
  text-overflow: ellipsis;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4eaf65;
  box-shadow: 0 0 0 3px rgba(78, 175, 101, .12);
}

.meta-label { color: var(--subtle); }
.meta-divider { color: var(--subtle); }

.top-actions {
  align-self: stretch;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
}

.open-button, .export-button {
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 17px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.open-button {
  background: var(--sky);
  color: #fff;
  box-shadow: 3px 3px 0 var(--ink);
}

.open-button:hover {
  background: var(--sky-dark);
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--ink);
}

.export-button {
  min-width: 118px;
  background: var(--ink);
  color: #fff;
}

.export-button:hover {
  background: var(--orange);
  transform: translateY(-1px);
}

.open-button svg, .export-button svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.history-actions {
  height: 42px;
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.icon-button {
  width: 39px;
  display: grid;
  place-items: center;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
}

.icon-button:last-child { border-right: 0; }
.icon-button:hover:not(:disabled) { background: var(--cream); }
.icon-button:disabled { color: #c9c5bd; cursor: default; }
.icon-button svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; }

.workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: 280px minmax(430px, 1fr) 320px;
  background: var(--ink);
  gap: 1px;
}

.panel {
  min-height: 0;
  background: var(--paper);
}

.style-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.panel-heading {
  min-height: 93px;
  padding: 20px 20px 17px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.panel-heading p {
  margin: 0 0 6px;
  color: var(--sky-dark);
  font: 8px var(--mono);
  letter-spacing: .12em;
}

.panel-heading h1, .panel-heading h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -.035em;
}

.panel-count {
  margin-left: auto;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--acid);
  color: var(--ink);
  font: 9px var(--mono);
}

.source-upload-card {
  position: relative;
  margin: 14px 14px 11px;
  min-height: 86px;
  padding: 13px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--ink);
  border-radius: 11px;
  background: var(--sky);
  color: #fff;
  text-align: left;
  box-shadow: 4px 4px 0 var(--ink);
  cursor: pointer;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.source-upload-card::after {
  content: "";
  position: absolute;
  width: 74px;
  height: 74px;
  right: -28px;
  bottom: -35px;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 50%;
}

.source-upload-card:hover {
  background: var(--sky-dark);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}

.source-upload-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 9px;
  background: var(--acid);
  color: var(--ink);
}

.source-upload-icon svg {
  width: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.source-upload-copy { min-width: 0; }
.source-upload-copy strong {
  display: block;
  font-size: 12px;
  font-weight: 780;
}

.source-upload-copy small {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, .75);
  font-size: 8px;
}

.source-upload-arrow {
  z-index: 1;
  align-self: start;
  font-size: 14px;
}

.library-label {
  padding: 1px 17px 6px;
  display: flex;
  justify-content: space-between;
  color: var(--subtle);
  font-size: 8px;
}

.library-label span:first-child {
  color: var(--ink);
  font-weight: 700;
}

.style-list {
  overflow-y: auto;
  padding: 3px 9px 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.style-card {
  position: relative;
  width: 100%;
  min-height: 69px;
  padding: 8px;
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

.style-card:hover {
  z-index: 1;
  border-color: var(--line);
  background: var(--cream);
  transform: translateX(2px);
}

.style-card.active {
  border-color: var(--ink);
  background: var(--acid);
  box-shadow: 2px 2px 0 var(--ink);
}

.style-thumb {
  position: relative;
  width: 68px;
  height: 50px;
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: var(--cream-deep);
}

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

.style-index {
  position: absolute;
  left: 3px;
  bottom: 3px;
  min-width: 18px;
  padding: 2px 3px;
  border-radius: 3px;
  background: var(--ink);
  color: #fff;
  font: 7px var(--mono);
  font-style: normal;
  text-align: center;
}

.style-copy { min-width: 0; }
.style-copy small {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font: 7px var(--mono);
  letter-spacing: .06em;
}

.style-copy strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.style-card.active .style-copy small { color: rgba(23, 25, 28, .55); }
.style-arrow {
  color: var(--subtle);
  font-size: 20px;
  transition: color .16s, transform .16s;
}

.style-card.active .style-arrow {
  color: var(--ink);
  transform: translateX(2px);
}

.panel-note {
  min-height: 54px;
  padding: 12px 16px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: var(--cream);
}

.privacy-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-top: 3px;
  border-radius: 50%;
  background: #4eaf65;
}

.panel-note p { margin: 0; font-size: 8px; line-height: 1.7; }
kbd {
  padding: 2px 4px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  color: var(--ink);
  font: 7px var(--mono);
}

.stage {
  position: relative;
  min-height: 0;
  display: grid;
  grid-template-rows: 54px minmax(0, 1fr) 37px;
  overflow: hidden;
  background: #cfe2f5;
}

.stage.dragging::after {
  content: "把图片放在这里";
  position: absolute;
  inset: 66px 18px 50px;
  z-index: 12;
  display: grid;
  place-items: center;
  border: 2px dashed var(--ink);
  border-radius: 18px;
  background: rgba(217, 246, 111, .94);
  color: var(--ink);
  font-family: var(--display);
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -.03em;
}

.stage-head, .stage-foot {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stage-head {
  padding: 0 15px 0 18px;
  border-bottom: 1px solid var(--ink);
  background: var(--paper);
}

.stage-foot {
  padding: 0 17px;
  border-top: 1px solid var(--ink);
  background: var(--paper);
  color: var(--muted);
  font: 8px var(--mono);
  letter-spacing: .03em;
}

.view-tabs {
  align-self: stretch;
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.view-tab {
  position: relative;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
}

.view-tab span {
  margin-right: 4px;
  color: var(--subtle);
  font: 7px var(--mono);
}

.view-tab:hover { color: var(--ink); }
.view-tab.active { color: var(--ink); }
.view-tab.active::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 0;
  height: 4px;
  border-radius: 4px 4px 0 0;
  background: var(--orange);
}

.zoom-control {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--cream);
  color: var(--muted);
  font: 8px var(--mono);
}

.zoom-control button {
  width: 26px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}

.zoom-control button:hover { background: var(--acid); }
.zoom-control span { min-width: 30px; text-align: center; }

.canvas-wrap {
  position: relative;
  min-height: 0;
  padding: 42px 52px;
  display: grid;
  place-items: center;
  overflow: auto;
  background-color: #cfe2f5;
  background-image:
    linear-gradient(rgba(255, 255, 255, .33) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .33) 1px, transparent 1px);
  background-size: 24px 24px;
}

.canvas-wrap::before {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -130px;
  top: -130px;
  border: 1px solid rgba(23, 25, 28, .18);
  border-radius: 50%;
  box-shadow: 0 0 0 28px rgba(255,255,255,.1), 0 0 0 56px rgba(255,255,255,.1);
}

.ambient-glow {
  position: absolute;
  inset: 18%;
  filter: blur(70px);
  opacity: .55;
  pointer-events: none;
}

.canvas-note {
  position: absolute;
  z-index: 2;
  color: rgba(23, 25, 28, .45);
  font: 8px/1.45 var(--mono);
  letter-spacing: .08em;
  pointer-events: none;
}

.note-top {
  top: 24px;
  right: 23px;
  text-align: right;
  transform: rotate(4deg);
}

.note-bottom {
  left: 22px;
  bottom: 24px;
  transform: rotate(-4deg);
}

.canvas-frame {
  position: relative;
  z-index: 1;
  display: inline-grid;
  place-items: stretch;
  max-width: 100%;
  max-height: 100%;
  border: 8px solid var(--paper);
  background: var(--ink);
  box-shadow: var(--shadow), 0 0 0 1px var(--ink);
  transition: transform .2s ease;
  animation: frame-in .55s cubic-bezier(.2, .75, .25, 1) both;
}

.canvas-frame::before, .canvas-frame::after {
  content: "";
  position: absolute;
  z-index: 6;
  width: 62px;
  height: 16px;
  background: rgba(217, 246, 111, .84);
  border: 1px solid rgba(23, 25, 28, .3);
  box-shadow: 0 2px 4px rgba(23, 25, 28, .08);
  pointer-events: none;
}

.canvas-frame::before { top: -17px; left: 20%; transform: rotate(-4deg); }
.canvas-frame::after { right: 15%; bottom: -17px; transform: rotate(3deg); }

@keyframes frame-in {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.canvas-frame canvas {
  display: block;
  grid-area: 1 / 1;
  max-width: 100%;
  max-height: calc(100vh - 268px);
  object-fit: contain;
}

.compare-layer {
  position: absolute;
  inset: 0;
  width: 50%;
  overflow: hidden;
  pointer-events: none;
}

.compare-layer canvas { width: auto; height: 100%; max-width: none; max-height: none; }
.compare-layer[aria-hidden="true"], .compare-line[aria-hidden="true"] { display: none; }

.compare-line {
  position: absolute;
  z-index: 7;
  inset: 0 auto 0 50%;
  width: 2px;
  background: #fff;
  cursor: ew-resize;
  box-shadow: 0 0 0 1px rgba(23, 25, 28, .25);
}

.compare-line i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28px;
  height: 42px;
  transform: translate(-50%,-50%);
  border: 1px solid #fff;
  border-radius: 16px;
  background: var(--ink);
  box-shadow: 0 3px 9px rgba(0,0,0,.2);
}

.compare-line i::before, .compare-line i::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 4px;
  height: 4px;
  border-top: 1px solid #fff;
  border-left: 1px solid #fff;
}

.compare-line i::before { left: 7px; transform: translateY(-50%) rotate(-45deg); }
.compare-line i::after { right: 7px; transform: translateY(-50%) rotate(135deg); }
.compare-line span {
  position: absolute;
  top: 8px;
  padding: 4px 6px;
  border-radius: 4px;
  background: var(--ink);
  color: white;
  font: 8px var(--mono);
  white-space: nowrap;
}

.compare-line span:first-child { right: 8px; }
.compare-line span:last-child { left: 8px; }

.processing {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-content: center;
  gap: 9px;
  background: rgba(23, 25, 28, .76);
  color: white;
  text-align: center;
}

.processing[hidden] { display: none; }
.processing span {
  width: 27px;
  height: 27px;
  margin: auto;
  border: 3px solid rgba(255,255,255,.25);
  border-top-color: var(--acid);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

.processing p { margin: 0; font-size: 9px; }
@keyframes spin { to { transform: rotate(360deg); } }

.recipe { color: var(--ink); }

.control-panel {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  background: var(--cream);
}

.control-panel .panel-heading {
  background: var(--paper);
}

.reset-button {
  margin-left: auto;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--cream);
  color: var(--muted);
  font-size: 8px;
  cursor: pointer;
}

.reset-button:hover { border-color: var(--orange); color: var(--orange-dark); }

.intensity-block {
  margin: 14px;
  padding: 16px;
  display: grid;
  grid-template-columns: 78px 1fr;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--ink);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 3px 3px 0 var(--ink);
}

.dial { position: relative; width: 74px; height: 74px; }
.dial svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dial-track, .dial-progress { fill: none; stroke-width: 5; }
.dial-track { stroke: var(--cream-deep); }
.dial-progress {
  stroke: var(--orange);
  stroke-linecap: round;
  stroke-dasharray: 257.6;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset .12s;
}

.dial > div {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}

.dial strong { color: var(--ink); font-family: var(--display); font-size: 21px; font-weight: 720; line-height: 1; }
.dial small { margin-top: 2px; color: var(--muted); font: 7px var(--mono); }
.dial input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; }
.intensity-block > div:last-child span { color: var(--orange-dark); font: 7px var(--mono); letter-spacing: .08em; }
.intensity-block h3 { margin: 5px 0; color: var(--ink); font-size: 14px; font-weight: 720; }
.intensity-block p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.45; }

.recipe-presets {
  margin: 0 14px 14px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}

.recipe-presets-head {
  margin-bottom: 10px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.recipe-presets-head span {
  color: var(--orange-dark);
  font: 7px var(--mono);
  letter-spacing: .08em;
}

.recipe-presets-head p {
  margin: 0;
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
}

.recipe-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.recipe-buttons button {
  min-width: 0;
  padding: 7px 5px;
  display: grid;
  justify-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--cream);
  color: var(--muted);
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.recipe-buttons button:hover,
.recipe-buttons button.active {
  border-color: var(--ink);
  background: var(--acid);
  color: var(--ink);
  transform: translateY(-1px);
}

.recipe-swatch {
  width: 100%;
  height: 17px;
  border: 1px solid rgba(23, 25, 28, .3);
  border-radius: 4px;
}

.recipe-swatch.warm { background: linear-gradient(90deg, #6d5847, #c99161, #e8d5ad); }
.recipe-swatch.faded { background: linear-gradient(90deg, #7f8074, #b2a78e, #ded3b8); }
.recipe-swatch.darkroom { background: linear-gradient(90deg, #1f2525, #56463e, #99765d); }
.recipe-buttons button span { min-width: 0; }
.recipe-buttons strong { display: block; color: inherit; font-size: 9px; }
.recipe-buttons small {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.control-groups {
  margin: 0 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}

.control-section { border-bottom: 1px solid var(--line); }
.control-section:last-child { border-bottom: 0; }
.control-section summary {
  padding: 14px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  color: var(--muted);
  font: 8px var(--mono);
  letter-spacing: .08em;
  cursor: pointer;
}

.control-section summary::-webkit-details-marker { display: none; }
.control-section summary::after {
  content: "+";
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font-size: 11px;
}

.control-section[open] summary { color: var(--ink); }
.control-section[open] summary::after {
  content: "−";
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.sliders { padding: 0 14px 14px; }
.group-hint {
  margin: -2px 0 8px;
  color: var(--subtle);
  font-size: 8px;
  line-height: 1.45;
}

.slider-row {
  min-height: 36px;
  display: grid;
  grid-template-columns: 68px 1fr 50px;
  align-items: center;
  gap: 8px;
}

.slider-row label { color: #4e5053; font-size: 10px; }
.slider-row output { color: var(--muted); font: 7px var(--mono); text-align: right; white-space: nowrap; }

input[type="range"] {
  --pct: 50%;
  appearance: none;
  height: 15px;
  background: transparent;
  cursor: ew-resize;
}

input[type="range"]:disabled { opacity: .34; cursor: default; }
input[type="range"]::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--sky) 0 var(--pct), var(--cream-deep) var(--pct) 100%);
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 12px;
  height: 12px;
  margin-top: -4.5px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--sky);
  box-shadow: 0 0 0 1px var(--ink);
}

input[type="range"]::-moz-range-track { height: 3px; background: var(--cream-deep); }
input[type="range"]::-moz-range-progress { height: 3px; background: var(--sky); }
input[type="range"]::-moz-range-thumb { width: 8px; height: 8px; border: 2px solid white; border-radius: 50%; background: var(--sky); }

.quick-actions {
  padding: 14px 14px 22px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.quick-actions button {
  height: 54px;
  display: grid;
  place-content: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--muted);
  font-size: 8px;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease;
}

.quick-actions button:hover {
  border-color: var(--ink);
  background: var(--acid);
  color: var(--ink);
  transform: translateY(-1px);
}

.quick-actions svg {
  width: 15px;
  margin: auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.export-dialog {
  width: min(510px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--ink);
  border-radius: 15px;
  background: var(--paper);
  color: var(--text);
  box-shadow: 8px 8px 0 var(--ink), 0 30px 90px rgba(0,0,0,.22);
}

.export-dialog::backdrop { background: rgba(38, 47, 57, .66); backdrop-filter: blur(6px); }
.export-dialog form { padding: 23px; }
.dialog-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 9px; }
.dialog-top button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--cream);
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
}

.export-dialog h2 {
  margin: 17px 0 5px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 27px;
  font-weight: 750;
  letter-spacing: -.04em;
}

.export-dialog > form > p { margin: 0 0 17px; color: var(--muted); font-size: 10px; }
.export-preview {
  position: relative;
  height: 195px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: 9px;
  background-color: #cfe2f5;
  background-image: linear-gradient(rgba(255,255,255,.3) 1px, transparent 1px), linear-gradient(90deg,rgba(255,255,255,.3) 1px,transparent 1px);
  background-size: 18px 18px;
}

.export-preview canvas { max-width: 100%; max-height: 100%; box-shadow: 0 8px 25px rgba(31,44,55,.22); }
.export-preview span { position: absolute; right: 8px; bottom: 8px; padding: 5px 7px; border-radius: 4px; background: var(--ink); color: white; font: 7px var(--mono); }
.export-options { margin: 14px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.export-options label { display: grid; gap: 5px; color: var(--muted); font-size: 9px; }
.export-options select { height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); color: var(--text); font-size: 10px; }
.quality-field { grid-column: 1 / -1; grid-template-columns: 54px 1fr 34px !important; align-items: center; }
.quality-field output { text-align: right; }
.download-button {
  width: 100%;
  height: 52px;
  padding: 0 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: white;
  cursor: pointer;
}

.download-button:hover { background: var(--orange); }
.download-button span { font-size: 12px; font-weight: 700; }
.download-button small { color: rgba(255,255,255,.7); font: 8px var(--mono); }

.toast {
  position: fixed;
  z-index: 120;
  left: 50%;
  bottom: 22px;
  padding: 11px 15px;
  transform: translate(-50%, 16px);
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--acid);
  color: var(--ink);
  font-size: 9px;
  font-weight: 650;
  box-shadow: 4px 4px 0 var(--ink);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* VINTAGE LAB — 1970s darkroom theme */
.topbar,
.panel,
.stage-head,
.stage-foot,
.export-dialog {
  background-color: var(--paper);
  background-image:
    linear-gradient(90deg, rgba(112, 82, 55, .035) 1px, transparent 1px),
    linear-gradient(rgba(112, 82, 55, .025) 1px, transparent 1px);
  background-size: 19px 19px;
}

.topbar {
  border-bottom: 2px solid var(--ink);
  box-shadow: 0 3px 0 rgba(42, 33, 26, .08);
}

.brand {
  border-right-width: 2px;
  font-family: "Futura", "Avenir Next", sans-serif;
  letter-spacing: .14em;
}

.brand small {
  color: var(--sky);
  font-family: var(--mono);
  letter-spacing: .13em;
}

.brand-mark {
  border-radius: 3px;
  background: var(--sky);
}

.brand-mark circle { fill: var(--orange); }

.file-meta {
  padding: 8px 14px;
  border-color: var(--ink);
  border-radius: 2px;
  background: #dfcfb1;
  box-shadow: 2px 2px 0 rgba(42, 33, 26, .25);
}

.status-dot {
  border-radius: 1px;
  background: #6d6b3f;
  box-shadow: none;
}

.open-button,
.export-button,
.history-actions,
.icon-button,
.reset-button {
  border-radius: 2px;
}

.open-button {
  background: var(--sky);
  box-shadow: 3px 3px 0 var(--ink);
}

.open-button:hover { background: var(--sky-dark); }

.export-button {
  background: var(--ink);
  color: var(--paper);
}

.export-button:hover { background: var(--orange-dark); }

.workspace { background: var(--ink); }

.source-upload-card {
  margin-top: 16px;
  border-radius: 3px;
  background: var(--sky);
  box-shadow: 5px 5px 0 var(--ink);
}

.source-upload-card::before {
  content: "IMPORT / 01";
  position: absolute;
  top: 7px;
  right: 9px;
  color: rgba(242, 230, 207, .64);
  font: 6px var(--mono);
  letter-spacing: .12em;
}

.source-upload-card::after {
  width: 88px;
  height: 88px;
  right: -35px;
  bottom: -44px;
  border-color: rgba(242, 230, 207, .3);
}

.source-upload-icon {
  border-radius: 2px;
  background: var(--orange);
}

.source-upload-copy small { color: rgba(242, 230, 207, .72); }

.library-label {
  color: var(--muted);
  font-family: var(--mono);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.library-label span:first-child { color: var(--sky-dark); }

.style-list { padding-inline: 10px; }

.style-card {
  border-radius: 2px;
  border-bottom: 1px dashed rgba(117, 105, 93, .22);
}

.style-card:hover {
  border-color: var(--line);
  background: #eadcc2;
}

.style-card.active {
  border-color: var(--ink);
  background: var(--orange);
  box-shadow: 3px 3px 0 var(--ink);
}

.style-thumb { border-radius: 2px; filter: sepia(.08); }
.style-index { border-radius: 1px; background: var(--ink); color: var(--paper); }
.style-copy small { color: var(--sky); letter-spacing: .08em; }
.style-card.active .style-copy small { color: rgba(42, 33, 26, .65); }

.panel-note {
  background: #d9c7a6;
  border-top: 2px solid var(--ink);
}

.privacy-dot {
  border-radius: 1px;
  background: #737044;
}

kbd {
  border-color: var(--ink);
  border-radius: 1px;
  background: var(--paper);
  box-shadow: 1px 1px 0 rgba(42,33,26,.2);
}

.stage { background: #2e302a; }

.stage-head {
  border-bottom: 2px solid var(--ink);
  background-color: #e3d3b5;
}

.view-tab {
  font-family: var(--mono);
  letter-spacing: .03em;
}

.view-tab.active::after {
  height: 3px;
  border-radius: 0;
  background: var(--sky);
}

.zoom-control {
  border-color: var(--ink);
  border-radius: 2px;
  background: #d4c19f;
  box-shadow: 2px 2px 0 rgba(42, 33, 26, .18);
}

.zoom-control button {
  border-radius: 1px;
  background: var(--paper);
}

.zoom-control button:hover { background: var(--orange); }

.canvas-wrap {
  background-color: #30312b;
  background-image:
    radial-gradient(circle at 94% 4%, rgba(130, 46, 35, .52), transparent 26%),
    linear-gradient(rgba(226, 209, 178, .075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(226, 209, 178, .075) 1px, transparent 1px);
  background-size: auto, 26px 26px, 26px 26px;
}

.canvas-wrap::before {
  width: 190px;
  height: 190px;
  right: -72px;
  top: -80px;
  border-color: rgba(227, 196, 137, .22);
  background: rgba(119, 39, 31, .18);
  box-shadow:
    0 0 0 22px rgba(119, 39, 31, .1),
    0 0 0 46px rgba(119, 39, 31, .06),
    0 0 70px rgba(167, 66, 45, .22);
}

.ambient-glow {
  opacity: .22;
  mix-blend-mode: screen;
}

.canvas-note {
  color: rgba(226, 209, 178, .5);
  font-family: var(--mono);
}

.canvas-frame {
  border: 9px solid #e8d8b9;
  background: #1f201d;
  box-shadow: var(--shadow), 0 0 0 2px var(--ink);
}

.canvas-frame::before,
.canvas-frame::after {
  height: 17px;
  border-color: rgba(42, 33, 26, .36);
  border-radius: 0;
  background: rgba(210, 162, 71, .88);
  mix-blend-mode: multiply;
}

.stage.dragging::after {
  border-color: var(--paper);
  border-radius: 2px;
  background: rgba(103, 39, 31, .95);
  color: var(--paper);
  font-family: var(--display);
}

.stage-foot {
  border-top: 2px solid var(--ink);
  background-color: #dfcfb1;
  color: var(--muted);
}

.recipe { color: var(--sky-dark); }

.control-panel {
  background-color: #dfcfb1;
  background-image:
    radial-gradient(circle at 100% 0, rgba(141, 60, 48, .08), transparent 30%),
    linear-gradient(rgba(112, 82, 55, .025) 1px, transparent 1px);
  background-size: auto, 18px 18px;
}

.control-panel .panel-heading {
  border-bottom: 2px solid var(--ink);
  background-color: var(--paper);
}

.panel-heading p {
  color: var(--sky);
  font-family: var(--mono);
}

.panel-heading h1,
.panel-heading h2,
.export-dialog h2 {
  font-family: var(--display);
  font-weight: 700;
}

.reset-button {
  border-color: var(--ink);
  background: transparent;
  color: var(--sky-dark);
}

.intensity-block {
  border-radius: 3px;
  background: #ede0c8;
  box-shadow: 4px 4px 0 var(--ink);
}

.dial-track { stroke: #cfbb98; }
.dial-progress { stroke: var(--sky); }
.dial strong { font-family: var(--mono); }
.intensity-block > div:last-child span { color: var(--sky); }

.recipe-presets,
.control-groups {
  border-color: var(--ink);
  border-radius: 3px;
  background: #eadcc3;
}

.recipe-presets-head span { color: var(--sky); }

.recipe-buttons button {
  border-color: var(--line);
  border-radius: 2px;
  background: #dfcfb1;
}

.recipe-buttons button:hover,
.recipe-buttons button.active {
  border-color: var(--ink);
  background: var(--orange);
}

.recipe-swatch { border-radius: 1px; filter: sepia(.14); }
.recipe-swatch.warm { background: linear-gradient(90deg, #5b362d, #a86842, #d6a75b); }
.recipe-swatch.faded { background: linear-gradient(90deg, #686454, #a49a78, #d5c398); }
.recipe-swatch.darkroom { background: linear-gradient(90deg, #211d19, #4e352c, #7e4936); }

.control-section { border-bottom-color: var(--line); }
.control-section summary { font-family: var(--mono); }
.control-section summary::after { border-radius: 1px; }
.control-section[open] summary::after { background: var(--sky-dark); }
.group-hint { color: #9a8977; }

input[type="range"]::-webkit-slider-runnable-track {
  background: linear-gradient(90deg, var(--sky) 0 var(--pct), #cbb999 var(--pct) 100%);
}

input[type="range"]::-webkit-slider-thumb {
  border-radius: 1px;
  background: var(--orange);
  box-shadow: 0 0 0 1px var(--ink);
}

.quick-actions button {
  border-color: var(--ink);
  border-radius: 2px;
  background: #e9dcc3;
}

.quick-actions button:hover {
  background: var(--orange);
  color: var(--ink);
}

.export-dialog {
  border: 2px solid var(--ink);
  border-radius: 3px;
  background-color: var(--paper);
  box-shadow: 8px 8px 0 var(--ink), 0 30px 90px rgba(0,0,0,.35);
}

.export-dialog::backdrop {
  background: rgba(35, 28, 23, .78);
  backdrop-filter: blur(4px) sepia(.25);
}

.dialog-top button,
.export-preview,
.export-options select,
.download-button {
  border-radius: 2px;
}

.export-preview {
  border: 2px solid var(--ink);
  background-color: #30312b;
  background-image:
    linear-gradient(rgba(226, 209, 178, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(226, 209, 178, .08) 1px, transparent 1px);
}

.download-button {
  background: var(--sky-dark);
  color: var(--paper);
  box-shadow: 3px 3px 0 var(--ink);
}

.download-button:hover { background: var(--sky); }

.toast {
  border-radius: 2px;
  background: var(--orange);
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
}

/* VINTAGE LAB — Victorian newspaper archive */
body {
  background-color: var(--cream);
  background-image:
    radial-gradient(circle at 17% 12%, rgba(255,255,255,.22), transparent 25%),
    radial-gradient(circle at 83% 74%, rgba(79,62,43,.08), transparent 30%);
}

.grain {
  opacity: .13;
  filter: sepia(1) contrast(1.15);
}

.app-shell { grid-template-rows: 88px minmax(0, 1fr); }

.topbar,
.panel,
.stage-head,
.stage-foot,
.export-dialog {
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 12% 28%, rgba(72,57,42,.05) 0 1px, transparent 1.5px),
    radial-gradient(circle at 78% 66%, rgba(255,255,255,.18), transparent 32%),
    repeating-linear-gradient(0deg, transparent 0 5px, rgba(70,56,43,.018) 5px 6px);
  background-size: 17px 19px, auto, auto;
}

.topbar {
  grid-template-columns: 330px minmax(0, 1fr) auto;
  border-bottom: 4px double var(--ink);
  box-shadow: none;
}

.brand {
  gap: 13px;
  padding-inline: 17px;
  border-right: 1px solid var(--ink);
  font-family: var(--display);
  letter-spacing: normal;
}

.brand-mark {
  width: 48px;
  height: 54px;
  border: 3px double var(--ink);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: rotate(-1.5deg);
}

.brand:hover .brand-mark {
  box-shadow: none;
  transform: rotate(1deg);
}

.brand-mark svg {
  width: 42px;
  height: 42px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.6;
}

.brand-mark .camera-body {
  fill: rgba(116, 88, 59, .12);
}

.brand-copy { min-width: 0; text-align: center; }

.brand-copy strong {
  display: block;
  color: var(--ink);
  font-family: var(--display);
  font-size: 23px;
  font-weight: 700;
  line-height: .9;
  letter-spacing: .06em;
  text-shadow:
    1px 1px 0 var(--paper),
    2px 2px 0 rgba(51,47,41,.18);
  white-space: nowrap;
}

.brand small {
  margin-top: 4px;
  color: var(--muted);
  font: 6px/1.15 var(--mono);
  letter-spacing: .08em;
  white-space: nowrap;
}

.brand .brand-kicker {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 6px;
  font-weight: 700;
  letter-spacing: .1em;
}

.file-meta {
  padding: 8px 13px;
  border: 3px double var(--ink);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-family: var(--mono);
}

.status-dot {
  width: 6px;
  height: 6px;
  background: var(--ink);
}

.open-button,
.export-button,
.history-actions,
.icon-button,
.reset-button {
  border-radius: 0;
  box-shadow: none;
}

.open-button,
.export-button {
  border: 1px solid var(--ink);
}

.open-button {
  background: var(--sky);
  color: var(--paper);
}

.open-button:hover { background: var(--sky-dark); box-shadow: none; }
.export-button { background: var(--ink); color: var(--paper); }
.export-button:hover { background: var(--sky-dark); }

.history-actions {
  border: 3px double var(--ink);
  background: transparent;
}

.icon-button { border-color: var(--line); }

.workspace {
  gap: 0;
  background: var(--ink);
}

.style-panel {
  border-right: 1px solid var(--ink);
}

.source-upload-card {
  min-height: 88px;
  margin: 14px 14px 12px;
  border: 4px double var(--ink);
  border-radius: 0;
  background:
    repeating-linear-gradient(135deg, rgba(51,47,41,.035) 0 2px, transparent 2px 7px),
    transparent;
  color: var(--ink);
  box-shadow: none;
}

.source-upload-card:hover {
  border-color: var(--ink);
  background: rgba(116,88,59,.09);
  box-shadow: none;
  transform: translateY(-1px);
}

.source-upload-card::before {
  content: "PHOTOGRAPHIC PLATE / IMPORT";
  color: var(--muted);
  font-size: 6px;
}

.source-upload-card::after { display: none; }

.source-upload-icon {
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
}

.source-upload-copy strong {
  font-family: var(--display);
  font-size: 14px;
  letter-spacing: .02em;
}

.source-upload-copy small { color: var(--muted); }
.source-upload-arrow { font-family: var(--display); }

.library-label {
  padding: 4px 15px 9px;
  border-bottom: 3px double var(--ink);
  color: var(--muted);
  font-family: var(--mono);
}

.library-label span:first-child {
  color: var(--ink);
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: .04em;
}

.style-list { padding: 5px 10px 10px; }

.style-card {
  min-height: 70px;
  border: 0;
  border-bottom: 1px solid rgba(51,47,41,.26);
  border-radius: 0;
}

.style-card:hover {
  border-color: var(--ink);
  background: rgba(116,88,59,.07);
  transform: none;
}

.style-card.active {
  border: 1px solid var(--ink);
  border-left: 5px solid var(--ink);
  background:
    repeating-linear-gradient(135deg, rgba(51,47,41,.035) 0 2px, transparent 2px 6px),
    rgba(116,88,59,.06);
  box-shadow: none;
}

.style-thumb {
  border: 1px solid var(--ink);
  border-radius: 0;
  filter: grayscale(.8) sepia(.55) contrast(.92);
}

.style-index {
  border: 1px solid var(--paper);
  border-radius: 0;
  background: var(--ink);
}

.style-copy small { color: var(--muted); font-family: var(--mono); }
.style-copy strong { font-family: var(--body); font-weight: 700; }
.style-card.active .style-copy small { color: var(--muted); }
.style-arrow { color: var(--ink); font-family: var(--display); }

.panel-note {
  border-top: 4px double var(--ink);
  background: transparent;
}

.privacy-dot { background: var(--ink); }

kbd {
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.stage {
  border-right: 1px solid var(--ink);
  background: var(--paper);
}

.stage-head {
  border-bottom: 4px double var(--ink);
  background-color: var(--paper);
}

.view-tab {
  color: var(--muted);
  font-family: var(--body);
  font-weight: 700;
}

.view-tab span {
  color: var(--muted);
  font-family: var(--mono);
}

.view-tab.active::after {
  height: 2px;
  border-radius: 0;
  background: var(--ink);
}

.zoom-control {
  border: 3px double var(--ink);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.zoom-control button {
  border-radius: 0;
  background: transparent;
}

.zoom-control button:hover {
  background: var(--ink);
  color: var(--paper);
}

.canvas-wrap {
  padding: 42px 54px 55px;
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 18% 21%, rgba(69,54,40,.06), transparent 25%),
    radial-gradient(circle at 82% 72%, rgba(255,255,255,.16), transparent 27%),
    repeating-linear-gradient(90deg, transparent 0 95px, rgba(51,47,41,.08) 95px 96px);
  background-size: auto, auto, auto;
}

.canvas-wrap::before {
  content: "VOL. I  ·  PLATE No. 01  ·  MMXXVI";
  width: auto;
  height: auto;
  right: 18px;
  top: 18px;
  padding: 4px 7px;
  border: 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  font: 7px var(--mono);
  letter-spacing: .08em;
}

.ambient-glow { display: none; }

.canvas-note {
  color: rgba(51,47,41,.48);
  font-family: var(--mono);
}

.canvas-frame {
  padding: 7px 7px 27px;
  border: 3px double var(--ink);
  background: #e7ddca;
  box-shadow: 4px 5px 0 rgba(51,47,41,.16);
}

.canvas-frame::before { display: none; }

.canvas-frame::after {
  content: "PLATE No. 01  —  A PHOTOGRAPHIC PROOF FROM THE VINTAGE LAB ARCHIVE";
  display: block;
  width: auto;
  height: auto;
  right: 7px;
  bottom: 6px;
  left: 7px;
  border: 0;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  font: 6px var(--mono);
  letter-spacing: .04em;
  text-align: center;
  transform: none;
}

.stage.dragging::after {
  border: 4px double var(--ink);
  border-radius: 0;
  background: rgba(222,212,193,.95);
  color: var(--ink);
}

.stage-foot {
  border-top: 4px double var(--ink);
  background-color: var(--paper);
  color: var(--muted);
}

.recipe { color: var(--ink); font-weight: 700; }

.control-panel {
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 80% 12%, rgba(61,48,35,.05), transparent 24%),
    repeating-linear-gradient(0deg, transparent 0 7px, rgba(51,47,41,.018) 7px 8px);
}

.control-panel .panel-heading {
  border-bottom: 4px double var(--ink);
  background: transparent;
}

.panel-heading p {
  color: var(--muted);
  font-family: var(--mono);
}

.panel-heading h1,
.panel-heading h2 {
  font-family: var(--display);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -.01em;
}

.reset-button {
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
}

.reset-button:hover { background: var(--ink); color: var(--paper); }

.intensity-block {
  border: 4px double var(--ink);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.dial-track { stroke: var(--line); }
.dial-progress { stroke: var(--ink); }
.dial strong { font-family: var(--display); }
.intensity-block > div:last-child span { color: var(--muted); }
.intensity-block h3 { font-family: var(--display); font-size: 16px; }

.recipe-presets,
.control-groups {
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
}

.recipe-presets { border-style: solid; }
.recipe-presets-head { border-bottom: 1px solid var(--ink); padding-bottom: 8px; }
.recipe-presets-head span { color: var(--muted); }
.recipe-presets-head p { font-family: var(--display); font-size: 12px; }

.recipe-buttons { gap: 0; border: 1px solid var(--ink); }

.recipe-buttons button {
  border: 0;
  border-right: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
}

.recipe-buttons button:last-child { border-right: 0; }

.recipe-buttons button:hover,
.recipe-buttons button.active {
  background: rgba(51,47,41,.12);
  color: var(--ink);
  transform: none;
}

.recipe-swatch {
  height: 12px;
  border: 1px solid var(--ink);
  border-radius: 0;
  filter: grayscale(1) sepia(.7);
}

.recipe-swatch.warm,
.recipe-swatch.faded,
.recipe-swatch.darkroom {
  background: repeating-linear-gradient(135deg, var(--ink) 0 1px, transparent 1px 3px);
}

.control-section { border-bottom: 1px solid var(--ink); }
.control-section summary { color: var(--ink); font-family: var(--body); font-weight: 700; }
.control-section summary::after { border: 1px solid var(--ink); border-radius: 0; }
.control-section[open] summary::after { background: var(--ink); color: var(--paper); }
.group-hint { color: var(--muted); font-family: var(--body); font-style: italic; }
.slider-row label { color: var(--ink); font-family: var(--body); }
.slider-row output { color: var(--muted); font-family: var(--mono); }

input[type="range"]::-webkit-slider-runnable-track {
  height: 1px;
  border-radius: 0;
  background: linear-gradient(90deg, var(--ink) 0 var(--pct), var(--line) var(--pct) 100%);
}

input[type="range"]::-webkit-slider-thumb {
  width: 10px;
  height: 12px;
  margin-top: -5.5px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  box-shadow: none;
}

.quick-actions { border-top: 3px double var(--ink); }

.quick-actions button {
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
}

.quick-actions button:hover {
  background: var(--ink);
  color: var(--paper);
}

.export-dialog {
  border: 4px double var(--ink);
  border-radius: 0;
  background-color: var(--paper);
  box-shadow: 7px 7px 0 rgba(51,47,41,.32);
}

.export-dialog::backdrop {
  background: rgba(48,43,36,.68);
  backdrop-filter: blur(3px) sepia(.6);
}

.dialog-top {
  padding-bottom: 8px;
  border-bottom: 3px double var(--ink);
  color: var(--ink);
  font-family: var(--mono);
}

.dialog-top button {
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
}

.export-dialog h2 { font-family: var(--display); font-size: 30px; }

.export-preview {
  border: 3px double var(--ink);
  border-radius: 0;
  background: #cfc3ae;
}

.export-options select {
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
}

.download-button {
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
  box-shadow: none;
}

.download-button:hover { background: var(--sky-dark); }

.toast {
  border: 3px double var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 4px 4px 0 rgba(51,47,41,.28);
  font-family: var(--body);
}

@media (max-width: 1180px) {
  .workspace { grid-template-columns: 250px minmax(390px, 1fr) 285px; }
  .topbar { grid-template-columns: 285px 1fr auto; }
  .brand { padding-inline: 13px; }
  .style-card { grid-template-columns: 58px minmax(0, 1fr) 18px; }
  .style-thumb { width: 58px; height: 47px; }
  .open-button { padding-inline: 13px; }
  .file-meta strong { max-width: 105px; }
  .canvas-wrap { padding-inline: 38px; }
}

@media (max-width: 920px) {
  body { overflow: auto; }
  .app-shell { display: block; height: auto; min-height: 100vh; }
  .topbar {
    position: sticky;
    top: 0;
    height: 66px;
    grid-template-columns: 1fr auto;
  }

  .brand { border-right: 0; }
  .file-meta, .history-actions, .open-button span { display: none; }
  .top-actions { gap: 7px; padding: 8px; }
  .open-button { width: 44px; height: 42px; padding: 0; box-shadow: 2px 2px 0 var(--ink); }
  .export-button { min-width: 92px; height: 42px; padding-inline: 11px; }
  .workspace { display: flex; flex-direction: column; gap: 0; }
  .stage { order: 1; height: 64vh; min-height: 480px; border-bottom: 1px solid var(--ink); }
  .style-panel { order: 2; display: grid; grid-template-rows: auto auto auto auto; border-bottom: 1px solid var(--ink); }
  .control-panel { order: 3; overflow: visible; }
  .panel-heading { min-height: 82px; }
  .style-list { display: flex; gap: 8px; overflow-x: auto; padding: 8px 12px 15px; }
  .style-card {
    flex: 0 0 128px;
    min-height: 112px;
    padding: 7px;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 68px auto;
    gap: 7px;
  }

  .style-thumb { width: 100%; height: 68px; }
  .style-copy small, .style-arrow { display: none; }
  .style-copy strong { font-size: 11px; }
  .panel-note { display: none; }
  .source-upload-card { max-width: 420px; margin-right: auto; }
  .library-label { padding-top: 7px; }
  .canvas-wrap { padding: 35px 24px; }
  .canvas-frame canvas { max-height: calc(64vh - 225px); }
  .stage-foot span:nth-child(2) { display: none; }
}

@media (max-width: 560px) {
  .brand { padding-inline: 13px; font-size: 14px; }
  .brand-copy strong { font-size: 17px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand-mark svg { width: 26px; height: 26px; }
  .brand small { display: none; }
  .export-button { min-width: 72px; }
  .export-button svg { display: none; }
  .stage { min-height: 445px; }
  .stage-head { padding-inline: 8px; }
  .view-tab { padding-inline: 7px; font-size: 9px; }
  .view-tab span, .note-top, .note-bottom { display: none; }
  .zoom-control { gap: 3px; }
  .canvas-wrap { padding: 28px 15px; }
  .stage-foot span:last-child { display: none; }
  .panel-heading h1, .panel-heading h2 { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
