/* Portrait Study web app. Strictly black and white, like a two-value study: no hue anywhere.
   Follows the system appearance: ink on paper in light mode, chalk on slate in dark mode.
   Desktops and laptops get a sidebar beside the work area; phones keep one column. */
:root {
  --bg: #f4f4f4;          /* the table the card lies on */
  --side: #fafafa;        /* sidebars and toolbars, a second neutral layer */
  --raised: #ffffff;      /* the paper mat, rows, menus */
  --primary: #121212;
  --on-primary: #ffffff;
  --secondary: rgba(0, 0, 0, 0.6);
  --faint: rgba(18, 18, 18, 0.07);
  --hover: rgba(18, 18, 18, 0.11);
  --hair: rgba(18, 18, 18, 0.12);
  --rule: rgba(18, 18, 18, 0.2);
  --shadow: rgba(0, 0, 0, 0.16);
  --serif: "New York", ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --side-w: 328px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0a;
    --side: #141414;
    --raised: #292929;
    --primary: #ffffff;
    --on-primary: #000000;
    --secondary: rgba(255, 255, 255, 0.62);
    --faint: rgba(255, 255, 255, 0.08);
    --hover: rgba(255, 255, 255, 0.13);
    --hair: rgba(255, 255, 255, 0.1);
    --rule: rgba(255, 255, 255, 0.2);
    --shadow: rgba(0, 0, 0, 0.5);
  }
}

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

html { -webkit-text-size-adjust: 100%; height: 100%; }

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--primary);
  font: 15px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  scrollbar-color: var(--rule) transparent;
}

::selection { background: var(--primary); color: var(--on-primary); }

[hidden] { display: none !important; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}
button:disabled { cursor: default; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.icon.sm { width: 16px; height: 16px; stroke-width: 2.2; }

.secondary { color: var(--secondary); }

.text-btn { color: var(--secondary); font-size: 15px; padding: 10px 4px; }
.text-btn:hover { color: var(--primary); }
.text-btn.small { font-size: 13px; font-weight: 600; padding: 4px 6px; }
.text-btn[aria-pressed="true"] { color: var(--primary); }

.spinner {
  display: inline-block;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }

/* Desktop tool button: an icon, a label, or both. */
.tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 34px;
  min-width: 34px;
  padding: 0 11px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
  transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}
.tool-btn.icon-only { padding: 0; }
.tool-btn:hover:not(:disabled) { background: var(--faint); }
.tool-btn:active:not(:disabled) { background: var(--hover); }
.tool-btn[aria-pressed="true"], .tool-btn[aria-pressed="true"]:hover { background: var(--primary); color: var(--on-primary); }
.tool-btn.primary, .tool-btn.primary:hover:not(:disabled) { background: var(--primary); color: var(--on-primary); padding: 0 12px 0 14px; }
.tool-btn.primary:hover:not(:disabled) { opacity: 0.86; }
.tool-btn:disabled { opacity: 0.35; }

/* ---------- Home ---------- */

.home {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "head" "main" "links";
  gap: 32px;
  max-width: 680px;
  margin: 0 auto;
  padding: calc(var(--safe-t) + 32px) calc(var(--safe-r) + 20px) calc(var(--safe-b) + 24px) calc(var(--safe-l) + 20px);
}

.home-head { grid-area: head; display: flex; flex-direction: column; gap: 14px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.brand h1 { font: 600 30px/1.1 var(--serif); letter-spacing: -0.01em; margin: 0; }
.home-head > p { margin: 0 0 6px; font-size: 15px; max-width: 34ch; }

.primary-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px 20px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 600;
  font-size: 16px;
  transition: transform 0.15s var(--ease), opacity 0.15s ease;
}
.primary-btn:hover { opacity: 0.88; }
.primary-btn:active { transform: scale(0.985); }
.primary-btn:disabled { opacity: 0.6; }
.primary-btn .spinner { width: 18px; height: 18px; border-width: 2px; border-color: color-mix(in srgb, var(--on-primary) 35%, transparent); border-top-color: var(--on-primary); }

.drop-hint { margin: -4px 0 0; text-align: center; font-size: 13px; }
@media (hover: none) { .drop-hint { display: none; } }

.home-main { grid-area: main; display: flex; flex-direction: column; gap: 32px; min-width: 0; }
.home-section { display: flex; flex-direction: column; gap: 12px; }
.section-title { margin: 0; font: 600 20px/1.2 var(--serif); }
.label-row { display: flex; align-items: center; justify-content: space-between; }

.samples { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.recents { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
.recents:empty { display: none; }

.thumb {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  overflow: hidden;
  background: var(--raised);
  transition: transform 0.2s var(--ease), box-shadow 0.2s ease;
}
.thumb:active { transform: scale(0.97); }
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.thumb img.ready { opacity: 1; }
.thumb .open { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; }
.thumb .delete {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 2px 8px var(--shadow);
}
.recents.editing .thumb .delete { display: flex; }
.recents.editing .thumb img { opacity: 0.75; }
@media (hover: hover) {
  .thumb:hover { transform: translateY(-2px); box-shadow: 0 8px 22px var(--shadow); }
  .thumb:hover .delete, .thumb .delete:focus-visible { display: flex; }
}

.empty {
  border: 1px dashed var(--rule);
  border-radius: 10px;
  padding: 18px 20px;
  font-size: 14px;
  color: var(--secondary);
}
.empty p { margin: 0; max-width: 52ch; }

.home-links { grid-area: links; display: flex; flex-direction: column; gap: 10px; }
.home-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--raised);
  text-decoration: none;
  transition: background 0.15s ease;
}
.home-row .row-icon { width: 24px; height: 24px; }
.home-row .row-text { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.home-row strong { font-size: 15px; font-weight: 600; }
.home-row .row-text span { font-size: 13px; color: var(--secondary); }
.home-row .chev { color: var(--secondary); }
.home-foot { margin: 6px 0 0; font-size: 13px; }

.drop-veil {
  position: fixed;
  inset: 12px;
  border: 2px dashed var(--primary);
  border-radius: 20px;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  font: 600 22px var(--serif);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 5;
}
.drop-veil.on { opacity: 1; }

/* Errors and notices, over every screen. */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--safe-b) + 24px);
  transform: translateX(-50%);
  max-width: min(440px, calc(100vw - 32px));
  padding: 11px 18px;
  border-radius: 12px;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
  box-shadow: 0 10px 30px var(--shadow);
  z-index: 20;
  animation: toast-in 0.2s var(--ease);
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }

/* Desktop library: the sidebar starts a study, the main area holds the photos. */
@media (min-width: 960px) {
  .home {
    max-width: none;
    margin: 0;
    min-height: 100vh;
    padding: 0;
    gap: 0;
    grid-template-columns: var(--side-w) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    grid-template-areas: "head main" "links main";
  }
  .home-head, .home-links { background: var(--side); border-right: 1px solid var(--hair); padding: 28px 24px; }
  .home-head { padding-top: 32px; }
  .home-links { justify-content: flex-end; gap: 2px; padding-bottom: 24px; }
  .home-row { background: transparent; padding: 10px 8px; margin: 0 -8px; gap: 12px; }
  .home-row:hover { background: var(--faint); }
  .home-row strong { font-size: 14px; }
  .home-row .row-icon { width: 22px; height: 22px; }
  .home-foot { margin-top: 14px; }
  .home-main { padding: 40px 48px 56px; gap: 44px; max-width: 1240px; }
  .section-title { font-size: 24px; }
  .samples, .recents { grid-template-columns: repeat(auto-fill, minmax(168px, 200px)); gap: 18px; }
  .home-main .empty { max-width: 854px; }
  .samples { grid-template-columns: repeat(4, minmax(0, 200px)); }
  .home-main .thumb { border-radius: 3px; box-shadow: 0 1px 3px var(--shadow); }
}

/* ---------- Onboarding ---------- */

.onboarding {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: var(--safe-t) var(--safe-r) var(--safe-b) var(--safe-l);
  overflow: hidden;
}
.ob-top { display: flex; justify-content: flex-end; height: 44px; padding: 0 20px; align-items: center; }
.ob-viewport { flex: 1; min-height: 0; overflow: hidden; touch-action: pan-y; }
.ob-track { display: flex; height: 100%; transition: transform 0.4s var(--ease); }
.ob-page {
  flex: 0 0 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 0 20px 12px;
}
.ob-page > * { width: 100%; max-width: 640px; margin: 0 auto; }
.ob-art {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.ob-card {
  max-width: 100%;
  max-height: 100%;
  min-height: 0;
  width: auto;
  height: auto;
  border-radius: 3px;
  box-shadow: 0 6px 24px var(--shadow);
  object-fit: contain;
}
.ob-cycle .ob-stack { position: relative; flex: 1; min-height: 0; width: 100%; }
.ob-cycle .ob-card { position: absolute; inset: 0; margin: auto; opacity: 0; transition: opacity 0.5s ease-in-out; }
.ob-cycle .ob-card.on { opacity: 1; }
.ob-cycle-label { font-size: 13px; font-weight: 600; color: var(--secondary); }
.ob-text { display: flex; flex-direction: column; gap: 10px; }
.ob-title { font: 600 28px/1.15 var(--serif); margin: 0; letter-spacing: -0.01em; text-wrap: balance; }
.ob-title.large { font-size: 34px; }
.ob-text p { margin: 0; color: var(--secondary); font-size: 16px; }
.ob-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 680px;
  height: 52px;
  margin: 0 auto 12px;
  padding: 0 20px;
}
.ob-dots { display: flex; gap: 8px; }
.ob-dots span { width: 8px; height: 8px; border-radius: 4px; background: var(--rule); transition: width 0.25s ease, background 0.25s ease; }
.ob-dots span.on { width: 20px; background: var(--primary); }

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 13px 22px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 600;
  transition: opacity 0.3s ease;
}
.pill-btn:disabled { opacity: 0.3; }

/* Desktop: the card on the left, the words on the right. */
@media (min-width: 960px) {
  .ob-page { flex-direction: row; align-items: center; gap: 72px; padding: 16px 72px 0; }
  .ob-page > * { margin: 0; }
  .ob-art { flex: 1 1 55%; max-width: none; height: 100%; padding: 8px 0 24px; }
  .ob-text { flex: 0 1 400px; max-width: 400px; }
  .ob-title { font-size: 38px; }
  .ob-title.large { font-size: 46px; }
  .ob-text p { font-size: 17px; }
  .ob-footer { max-width: none; padding: 0 72px; margin-bottom: 28px; }
}

/* ---------- Study ---------- */

.viewer {
  position: fixed;
  inset: 0;
  display: flex;
  background: var(--bg);
  overflow: hidden;
  z-index: 2;
}

.v-side { display: none; }
.only-desktop { display: none !important; }

.v-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: calc(var(--safe-t) + 8px) calc(var(--safe-r) + 20px) calc(var(--safe-b) + 8px) calc(var(--safe-l) + 20px);
}

.v-toolbar { position: relative; display: flex; align-items: center; gap: 8px; flex: none; }
.tool-spacer { flex: 1; }
.tool-sep { width: 1px; height: 20px; background: var(--hair); margin: 0 6px; }
.tool-group { display: flex; align-items: center; gap: 2px; }

.round {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--faint);
  color: var(--primary);
  transition: background 0.2s ease, color 0.2s ease, opacity 0.3s ease;
  flex: none;
}
.round[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); }
.round.outline { background: transparent; box-shadow: inset 0 0 0 1px var(--rule); }
.round.filled { background: var(--primary); color: var(--on-primary); }
.round:disabled { opacity: 0.35; }
@media (hover: hover) {
  .round:not(:disabled):not(.filled):not([aria-pressed="true"]):hover { background: var(--hover); }
}

.v-count {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 15px;
  color: var(--secondary);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.menu-wrap { position: relative; }
.menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 190px;
  padding: 6px;
  border-radius: 12px;
  background: var(--raised);
  box-shadow: 0 10px 36px var(--shadow), 0 0 0 1px var(--hair);
  z-index: 10;
  display: flex;
  flex-direction: column;
}
.menu button { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 7px; text-align: left; font-size: 14px; }
.menu button:hover, .menu button:focus-visible { background: var(--faint); outline: none; }

.v-stage {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
  outline: none;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.v-stage.can-peek { cursor: pointer; }
.v-stage.zoomed { cursor: grab; }
.v-stage.panning { cursor: grabbing; }
.v-stage.loupe-on { cursor: crosshair; }

.v-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.v-fade { opacity: 0; pointer-events: none; }
.v-fade.fading { transition: opacity 0.25s ease-out; }

.v-loading { position: absolute; display: flex; align-items: center; justify-content: center; overflow: hidden; transition: opacity 0.3s ease-out; pointer-events: none; }
.v-loading.done { opacity: 0; }
.v-blur { position: absolute; inset: 0; width: 100%; height: 100%; filter: blur(14px); transform: scale(1.12); }
.v-loading .spinner { position: relative; box-shadow: 0 0 0 14px rgba(0, 0, 0, 0.35); background: rgba(0, 0, 0, 0.35); }
.v-spin { position: absolute; left: 50%; top: 50%; margin: -15px 0 0 -15px; border-color: var(--rule); border-top-color: var(--primary); }

.v-loupe {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 0 0 4px #fff, 0 0 0 5px rgba(0, 0, 0, 0.25), 0 14px 34px rgba(0, 0, 0, 0.35);
  z-index: 3;
}

.zoom-pill {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: color-mix(in srgb, var(--raised) 78%, transparent);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow: 0 2px 10px var(--shadow);
  z-index: 2;
}

.v-badge {
  position: absolute;
  transform: translateX(-50%);
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
  color: var(--primary);
  background: color-mix(in srgb, var(--raised) 75%, transparent);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  opacity: 0;
  transition: opacity 0.3s ease-out;
  pointer-events: none;
  z-index: 2;
}
.v-badge.on { opacity: 1; }

.v-message {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 14px;
  color: var(--secondary);
  padding: 20px;
  pointer-events: none;
}
.v-message:empty { display: none; }

/* Phone controls under the card. */
.v-controls { display: flex; flex-direction: column; gap: 16px; width: 100%; max-width: 420px; margin: 0 auto; flex: none; }
.v-captions { display: grid; }
.caption { grid-area: 1 / 1; display: flex; gap: 14px; align-items: flex-start; opacity: 0; visibility: hidden; transition: opacity 0.25s ease-in-out; }
.caption.on { opacity: 1; visibility: visible; }
.caption .num { font: italic 500 52px/1 var(--serif); min-width: 30px; margin-top: -4px; }
.caption h2 { font: 600 22px/1.2 var(--serif); margin: 0 0 4px; }
.caption p { margin: 0; font-size: 15px; line-height: 1.35; color: var(--secondary); }

.v-lever-slot { display: grid; }
.lever { display: flex; align-items: center; }
.pill-lever {
  grid-area: 1 / 1;
  height: 48px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--raised);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease-in-out, visibility 0.2s;
}
.pill-lever.on { opacity: 1; visibility: visible; }
.lever-btn { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 50%; flex: none; }
.lever-btn:hover:not(:disabled) { background: var(--faint); }
.lever-btn:disabled { opacity: 0.3; }
.lever-label { flex: 1; text-align: center; font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }

.v-bottom { display: flex; align-items: center; justify-content: space-between; height: 44px; }
.v-steps { display: flex; gap: 2px; }
.step { padding: 7px 3px; display: flex; transition: opacity 0.3s ease; }
.step span {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  box-shadow: inset 0 0 0 1.5px var(--primary);
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}
.step.upcoming span { box-shadow: inset 0 0 0 1.5px var(--rule); color: var(--secondary); }
.step.current span { background: var(--primary); color: var(--on-primary); }
.step:disabled { opacity: 0.35; }

@media (max-height: 640px) and (max-width: 959px) {
  .v-main { gap: 10px; }
  .v-controls { gap: 10px; }
  .caption .num { font-size: 40px; }
  .caption h2 { font-size: 19px; }
  .caption p { font-size: 13px; }
}

/* ---------- Study on desktops and laptops ---------- */

@media (min-width: 960px) {
  .only-mobile, .only-mobile-flex { display: none !important; }
  .only-desktop { display: inline-flex !important; }

  .v-side {
    display: flex;
    flex-direction: column;
    width: var(--side-w);
    flex: none;
    background: var(--side);
    border-right: 1px solid var(--hair);
    padding: 12px 16px 20px;
    overflow-y: auto;
  }
  .side-head { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: 0 4px 20px; }
  .side-head .tool-btn { margin-left: -10px; padding-left: 6px; color: var(--secondary); }
  .side-head .tool-btn:hover { color: var(--primary); }
  .side-title {
    margin: 0;
    font: 600 22px/1.2 var(--serif);
    letter-spacing: -0.005em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
  }

  .step-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
  .step-row {
    width: 100%;
    display: grid;
    grid-template-columns: 30px 1fr auto;
    grid-template-areas: "num title ladder" ". hint hint";
    align-items: center;
    column-gap: 12px;
    padding: 10px 12px 10px 8px;
    border-radius: 10px;
    text-align: left;
    transition: background 0.15s ease, color 0.15s ease, opacity 0.2s ease;
  }
  .step-row:hover:not(:disabled):not([aria-current]) { background: var(--faint); }
  .step-row:disabled { opacity: 0.4; }
  .step-row .row-num { grid-area: num; font: italic 500 28px/1 var(--serif); text-align: center; }
  .step-row .row-title { grid-area: title; font-size: 18px; font-weight: 500; }
  .step-row .ladder { grid-area: ladder; }
  .step-row .row-hint {
    grid-area: hint;
    display: none;
    margin: 8px 0 2px;
    font-size: 14.5px;
    line-height: 1.45;
    color: color-mix(in srgb, var(--on-primary) 74%, transparent);
    text-wrap: pretty;
  }
  .step-row[aria-current] { background: var(--primary); color: var(--on-primary); }
  .step-row[aria-current] .row-title { font-weight: 600; }
  .step-row[aria-current] .row-hint { display: block; }

  /* Each step draws its own value ladder: the outline, two, three and five values, the blur, the photo. */
  .ladder { display: flex; width: 64px; height: 22px; border-radius: 3px; overflow: hidden; box-shadow: 0 0 0 1px var(--rule); }
  .ladder span { flex: 1; }
  .ladder.outline { box-shadow: none; overflow: visible; }
  .ladder.outline svg { width: 64px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: miter; }
  .ladder.blur span { background: linear-gradient(90deg, #141414, #8a8a8a 50%, #f7f7f7); filter: blur(2px); transform: scale(1.25); }
  .ladder.photo { background: var(--hair); }
  .ladder.photo canvas { width: 64px; height: 22px; display: block; }
  .step-row[aria-current] .ladder { box-shadow: 0 0 0 1px color-mix(in srgb, var(--on-primary) 30%, transparent); }
  .step-row[aria-current] .ladder.outline { box-shadow: none; }

  .side-status { margin: 14px 10px 0; font-size: 13px; }
  .side-status:empty { display: none; }
  .side-adjust { margin-top: auto; padding-top: 24px; display: flex; flex-direction: column; gap: 14px; }
  .adjust-row { display: flex; flex-direction: column; gap: 6px; }
  .adjust-label { font-size: 12px; font-weight: 600; color: var(--secondary); padding-left: 4px; }
  .side-adjust .lever { height: 40px; padding: 0 3px; border-radius: 10px; background: var(--raised); box-shadow: 0 0 0 1px var(--hair); }
  .side-adjust .lever-btn { width: 34px; height: 34px; border-radius: 8px; }
  .side-adjust .lever-label { font-size: 14px; }

  .v-main { padding: 0; gap: 0; }
  .v-toolbar { height: 56px; padding: 0 16px; gap: 4px; border-bottom: 1px solid var(--hair); background: var(--side); }
  .zoom-readout { min-width: 60px; font-variant-numeric: tabular-nums; }
  .tool-export {
    width: auto;
    height: 34px;
    border-radius: 8px;
    padding: 0 11px;
    background: transparent;
    font-size: 13px;
    font-weight: 500;
  }
  .tool-export .icon { width: 18px; height: 18px; }
  .tool-export:hover:not(:disabled) { background: var(--faint) !important; }
}
