@font-face {
  font-family: "Odin Inter";
  src: url("./assets/fonts/inter-variable.ttf") format("truetype");
  font-weight: 100 900;
}

@font-face {
  font-family: "Odin Playfair";
  src: url("./assets/fonts/playfair-display-variable.ttf") format("truetype");
  font-weight: 400 900;
}

:root {
  color-scheme: light;
  --bg: #f5f7f7;
  --surface: #ffffff;
  --surface-soft: #eef4f3;
  --ink: #071314;
  --panel: #0a1718;
  --panel-soft: #102728;
  --panel-line: #214040;
  --text: #0a1718;
  --muted: #647172;
  --muted-dark: #9aa6a4;
  --line: #dce5e3;
  --line-strong: #b9c9c6;
  --accent: #0c8f87;
  --accent-strong: #06635f;
  --accent-soft: #dff5f2;
  --gold: #c89a4a;
  --danger: #bd3b3b;
  --radius: 8px;
  --shadow: 0 18px 48px rgba(12, 28, 28, .08);
  --split: 50%;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #ffffff 0, var(--bg) 360px), var(--bg);
  font-family: "Odin Inter", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(12, 143, 135, .38);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

[hidden] {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto minmax(360px, 1fr);
  align-items: center;
  gap: 18px;
  min-height: 74px;
  padding: 12px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid rgba(220, 229, 227, .86);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(18px);
}

.brand,
.top-actions,
.main-nav,
.local-pill,
.primary-button,
.secondary-button,
.icon-button,
.tool-button {
  display: inline-flex;
  align-items: center;
}

.brand {
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: var(--radius);
  color: #ffffff;
  background: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.brand-copy {
  min-width: 0;
}

.brand-copy strong,
.brand-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy strong {
  font-family: "Odin Playfair", Georgia, serif;
  font-size: 22px;
  line-height: 1;
}

.brand-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.main-nav {
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.nav-link {
  min-height: 38px;
  min-width: 92px;
  border: 0;
  border-radius: 6px;
  color: #435151;
  background: transparent;
  font-size: 13px;
  font-weight: 800;
}

.nav-link.is-active {
  color: var(--text);
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(7, 19, 20, .08);
}

.top-actions {
  justify-self: end;
  gap: 10px;
}

.local-pill {
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: #ffffff;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.local-pill.dark {
  color: #efe6d2;
  border-color: rgba(200, 154, 74, .32);
  background: rgba(200, 154, 74, .12);
}

.signal-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.primary-button,
.secondary-button,
.icon-button,
.tool-button {
  justify-content: center;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.primary-button,
.secondary-button {
  gap: 8px;
  min-height: 42px;
  padding: 0 15px;
}

.primary-button {
  border: 1px solid var(--accent-strong);
  color: #ffffff;
  background: var(--accent);
  box-shadow: 0 12px 24px rgba(12, 143, 135, .2);
}

.secondary-button {
  border: 1px solid var(--line-strong);
  color: var(--text);
  background: #ffffff;
}

.secondary-button.compact {
  min-height: 36px;
  padding: 0 10px;
}

.secondary-button.dark {
  color: #dce9e7;
  border-color: var(--panel-line);
  background: rgba(255, 255, 255, .04);
}

.primary-button.full {
  width: 100%;
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.studio-shell {
  display: grid;
  grid-template-columns: 292px minmax(420px, 1fr) 348px;
  gap: 14px;
  width: min(100%, 1720px);
  min-height: calc(100vh - 74px);
  margin: 0 auto;
  padding: 14px clamp(14px, 3vw, 28px) 28px;
}

.panel,
.canvas-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.library-panel,
.inspector-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
  padding: 16px;
}

.inspector-panel {
  color: #ffffff;
  border-color: rgba(33, 64, 64, .92);
  background: linear-gradient(180deg, #081415 0, #071314 100%);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-head h2,
.canvas-toolbar h1 {
  margin: 4px 0 0;
  font-size: 20px;
  line-height: 1.15;
}

.panel-kicker {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.inspector-panel .panel-kicker,
.canvas-toolbar .panel-kicker {
  color: var(--muted-dark);
}

.event-title-input {
  width: 100%;
  min-width: 0;
  margin-top: 3px;
  padding: 0;
  border: 0;
  color: var(--text);
  background: transparent;
  font-size: 20px;
  font-weight: 900;
}

.icon-button,
.tool-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.tool-button {
  color: #dce9e7;
  border-color: rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .06);
}

.tool-button.is-wide {
  width: auto;
  padding: 0 12px;
}

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

.metric-grid article {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.metric-grid strong,
.metric-grid span {
  display: block;
}

.metric-grid strong {
  font-size: 18px;
  line-height: 1;
}

.metric-grid span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
}

.section-title strong {
  font-size: 14px;
}

.section-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.thumb-list {
  display: grid;
  gap: 8px;
  max-height: 434px;
  overflow: auto;
  padding-right: 2px;
}

.thumb-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 74px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: inherit;
  background: #ffffff;
  text-align: left;
}

.thumb-row.is-selected {
  border-color: rgba(12, 143, 135, .42);
  background: linear-gradient(180deg, #ffffff 0, var(--accent-soft) 100%);
}

.thumb-row.is-rejected {
  opacity: .56;
}

.thumb-row img {
  width: 58px;
  height: 50px;
  object-fit: cover;
  border-radius: 6px;
}

.thumb-row strong,
.thumb-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thumb-main {
  min-width: 0;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.thumb-row strong {
  font-size: 13px;
}

.thumb-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.thumb-actions {
  display: grid;
  gap: 4px;
}

.thumb-actions button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: #ffffff;
  font-weight: 900;
}

.thumb-actions button.is-on {
  color: #ffffff;
  border-color: var(--accent-strong);
  background: var(--accent);
}

.thumb-actions button.is-reject-on {
  color: #ffffff;
  border-color: #8d2525;
  background: var(--danger);
}

.batch-box,
.privacy-box {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.batch-box strong,
.privacy-box strong {
  display: block;
  margin-top: 4px;
  font-size: 15px;
}

.privacy-box span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.4;
}

.mini-actions,
.export-actions,
.transform-actions {
  display: grid;
  gap: 8px;
}

.canvas-panel {
  display: grid;
  grid-template-rows: auto minmax(360px, 1fr) auto auto;
  min-width: 0;
  overflow: hidden;
  color: #ffffff;
  border-color: rgba(33, 64, 64, .88);
  background: #071314;
  box-shadow: 0 22px 60px rgba(7, 19, 20, .18);
}

.canvas-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  background: #071314;
}

.canvas-actions {
  display: flex;
  gap: 8px;
}

.photo-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 18px;
  overflow: auto;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .02) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, .02) 1px, transparent 1px),
    #0a1718;
  background-size: 42px 42px;
}

.canvas-empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  max-width: 420px;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .04);
  text-align: center;
}

.canvas-empty strong {
  font-size: 24px;
}

.canvas-empty span {
  color: var(--muted-dark);
  line-height: 1.45;
}

.canvas-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--radius);
  background: #111;
  box-shadow: 0 26px 80px rgba(0, 0, 0, .32);
  cursor: ew-resize;
  touch-action: none;
  user-select: none;
}

.canvas-wrap.is-crop-tool {
  cursor: grab;
  touch-action: none;
}

.canvas-wrap.is-cropping {
  cursor: grabbing;
}

.canvas-wrap.is-zoom-100 {
  box-shadow: 0 34px 96px rgba(0, 0, 0, .4);
}

.canvas-wrap canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.canvas-wrap canvas[data-edited-canvas] {
  clip-path: inset(0 0 0 var(--split));
}

.canvas-wrap.is-crop-tool canvas[data-edited-canvas] {
  clip-path: inset(0);
}

.canvas-wrap.is-mask-tool canvas[data-edited-canvas] {
  clip-path: inset(0);
}

.canvas-wrap.is-crop-tool .split-line,
.canvas-wrap.is-crop-tool .canvas-badge,
.canvas-wrap.is-mask-tool .split-line,
.canvas-wrap.is-mask-tool .canvas-badge {
  display: none;
}

.mask-overlay-canvas {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: none;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: screen;
}

.canvas-wrap.is-mask-tool .mask-overlay-canvas {
  display: block;
}

.canvas-wrap.is-mask-tool {
  cursor: crosshair;
}

.canvas-wrap.is-masking {
  cursor: none;
}

.crop-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: none;
  pointer-events: none;
  border: 2px solid rgba(255, 255, 255, .78);
  box-shadow: inset 0 0 0 1px rgba(7, 19, 20, .45), 0 0 0 999px rgba(7, 19, 20, .18);
}

.canvas-wrap.is-crop-tool .crop-overlay {
  display: block;
}

.crop-line,
.crop-diagonal {
  position: absolute;
  display: none;
  background: rgba(255, 255, 255, .42);
}

.crop-line.third-v,
.crop-line.center-v {
  top: 0;
  bottom: 0;
  width: 1px;
}

.crop-line.third-h,
.crop-line.center-h {
  left: 0;
  right: 0;
  height: 1px;
}

.crop-line.third-v.one { left: 33.333%; }
.crop-line.third-v.two { left: 66.666%; }
.crop-line.third-h.one { top: 33.333%; }
.crop-line.third-h.two { top: 66.666%; }
.crop-line.center-v { left: 50%; }
.crop-line.center-h { top: 50%; }

.canvas-wrap.guide-thirds .crop-line.third-v,
.canvas-wrap.guide-thirds .crop-line.third-h,
.canvas-wrap.guide-center .crop-line.center-v,
.canvas-wrap.guide-center .crop-line.center-h,
.canvas-wrap.guide-diagonals .crop-diagonal {
  display: block;
}

.crop-diagonal {
  left: 50%;
  top: 50%;
  width: 142%;
  height: 1px;
  transform-origin: center;
}

.crop-diagonal.one {
  transform: translate(-50%, -50%) rotate(35deg);
}

.crop-diagonal.two {
  transform: translate(-50%, -50%) rotate(-35deg);
}

.crop-handle {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid #ffffff;
  border-radius: 4px;
  background: rgba(12, 143, 135, .82);
  box-shadow: 0 0 0 2px rgba(7, 19, 20, .72);
}

.crop-handle.top-left { left: -2px; top: -2px; }
.crop-handle.top { left: 50%; top: -2px; transform: translateX(-50%); }
.crop-handle.top-right { right: -2px; top: -2px; }
.crop-handle.right { right: -2px; top: 50%; transform: translateY(-50%); }
.crop-handle.bottom-right { right: -2px; bottom: -2px; }
.crop-handle.bottom { left: 50%; bottom: -2px; transform: translateX(-50%); }
.crop-handle.bottom-left { left: -2px; bottom: -2px; }
.crop-handle.left { left: -2px; top: 50%; transform: translateY(-50%); }

.canvas-wrap.is-crop-tool .zoom-badge {
  z-index: 4;
}

.split-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--split);
  width: 2px;
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(7, 19, 20, .3), 0 0 22px rgba(255, 255, 255, .45);
  pointer-events: none;
  z-index: 2;
}

.split-line::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 0;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: var(--radius);
  background: rgba(7, 19, 20, .62);
  transform: translate(-50%, -50%);
  backdrop-filter: blur(10px);
}

.split-line::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: 14px;
  height: 18px;
  border-left: 2px solid rgba(255, 255, 255, .84);
  border-right: 2px solid rgba(255, 255, 255, .84);
  transform: translate(-50%, -50%);
}

.canvas-wrap.is-dragging .split-line::after {
  border-color: rgba(12, 143, 135, .95);
  background: rgba(12, 143, 135, .72);
}

.canvas-badge,
.zoom-badge {
  position: absolute;
  z-index: 2;
  min-height: 30px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: var(--radius);
  color: rgba(255, 255, 255, .86);
  background: rgba(7, 19, 20, .6);
  font-size: 12px;
  font-weight: 850;
  backdrop-filter: blur(10px);
}

.canvas-badge {
  left: 12px;
  top: 12px;
}

.zoom-badge {
  right: 12px;
  bottom: 12px;
}

.processing-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 5;
  display: none;
  max-width: calc(100% - 24px);
  min-height: 30px;
  padding: 7px 10px;
  border: 1px solid rgba(200, 154, 74, .34);
  border-radius: var(--radius);
  color: #f5e3bd;
  background: rgba(7, 19, 20, .82);
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.canvas-wrap.is-processing .processing-badge {
  display: block;
}

.under-canvas {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 16px 14px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.view-actions {
  display: flex;
  justify-content: flex-end;
}

.view-actions button.is-active {
  border-color: rgba(12, 143, 135, .86);
  color: #ffffff;
  background: var(--accent);
}

.compare-control {
  display: grid;
  gap: 8px;
  color: var(--muted-dark);
  font-size: 12px;
  font-weight: 850;
}

.compare-control span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.compare-control small {
  color: rgba(255, 255, 255, .62);
  font-size: 11px;
  font-weight: 750;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.preset-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(150px, 176px);
  gap: 10px;
  overflow-x: auto;
  padding: 0 16px 16px;
}

.preset-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--radius);
  color: #ffffff;
  background: rgba(255, 255, 255, .04);
  text-align: left;
}

.preset-card.is-selected {
  border-color: rgba(12, 143, 135, .82);
  background: rgba(12, 143, 135, .16);
}

.preset-card img {
  width: 100%;
  height: 86px;
  object-fit: cover;
  border-radius: 6px;
  background: #071314;
}

.preset-card span,
.preset-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preset-card span {
  font-size: 12px;
  font-weight: 850;
}

.preset-card small {
  color: var(--muted-dark);
  font-size: 11px;
  font-weight: 700;
}

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

.tab-button,
.format-grid button {
  min-height: 40px;
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  color: #dce9e7;
  background: #0b1c1d;
  font-size: 13px;
  font-weight: 850;
}

.tab-button.is-active,
.format-grid button.is-selected {
  border-color: rgba(12, 143, 135, .92);
  color: #ffffff;
  background: var(--accent);
}

.tool-pane {
  display: none;
  gap: 14px;
}

.tool-pane.is-active {
  display: grid;
}

.curve-module,
.color-pro-module,
.detail-pro-module,
.crop-pro-module,
.odin-pro-module,
.recipe-module,
.mask-pro-module {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(12, 143, 135, .3);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(12, 143, 135, .11), rgba(255, 255, 255, .035));
}

.curve-head,
.curve-tabs,
.curve-actions {
  display: grid;
  gap: 8px;
}

.curve-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.curve-head strong {
  display: block;
  color: #ffffff;
  font-size: 15px;
  font-weight: 900;
}

.curve-head span,
.curve-live {
  color: var(--muted-dark);
  font-size: 11px;
  font-weight: 800;
}

.curve-live {
  padding: 5px 8px;
  border: 1px solid rgba(200, 154, 74, .35);
  border-radius: var(--radius);
  color: #f0d9aa;
  background: rgba(200, 154, 74, .12);
}

.curve-tabs {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.curve-tabs button,
.curve-actions button {
  min-height: 34px;
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  color: #dce9e7;
  background: #081415;
  font-size: 12px;
  font-weight: 850;
}

.curve-tabs button.is-active {
  border-color: rgba(12, 143, 135, .94);
  color: #ffffff;
  background: var(--accent);
}

.curve-canvas {
  display: block;
  width: 100%;
  max-width: 100%;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius);
  background: #081415;
  cursor: crosshair;
  touch-action: none;
}

.curve-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.levels-block {
  display: grid;
  gap: 10px;
}

.hsl-swatch-grid,
.grade-band-grid,
.grade-preset-grid {
  display: grid;
  gap: 8px;
}

.hsl-swatch-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grade-band-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grade-preset-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hsl-swatch-grid button,
.grade-band-grid button,
.grade-preset-grid button {
  min-height: 34px;
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  color: #dce9e7;
  background: #081415;
  font-size: 11px;
  font-weight: 850;
}

.hsl-swatch-grid button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  padding-inline: 8px;
  text-align: left;
}

.hsl-swatch-grid span {
  width: 12px;
  height: 12px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  background: var(--swatch);
}

.hsl-swatch-grid button.is-active,
.grade-band-grid button.is-active {
  border-color: rgba(12, 143, 135, .94);
  color: #ffffff;
  background: rgba(12, 143, 135, .88);
}

.grade-preset-grid button {
  border-color: rgba(200, 154, 74, .26);
  color: #f1dfbd;
  background: rgba(200, 154, 74, .1);
}

.hue-slider input {
  accent-color: #c89a4a;
}

.section-title.compact {
  margin-top: 2px;
}

.slider-row {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .04);
}

.slider-row.compact {
  gap: 8px;
  padding: 10px;
}

.slider-row span,
.toggle-row span,
.field-row span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #dce9e7;
  font-size: 13px;
  font-weight: 850;
}

.slider-row strong {
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.toggle-row,
.field-row {
  display: grid;
  gap: 8px;
  min-height: 46px;
  padding: 12px;
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .04);
}

.toggle-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.toggle-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.field-row select,
.watermark-input {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  color: #ffffff;
  background: #081415;
  font-size: 13px;
  font-weight: 800;
}

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

.crop-format-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.crop-format-grid button {
  min-height: 36px;
  font-size: 11px;
}

.crop-action-grid,
.guide-grid,
.odin-tool-list,
.recipe-action-grid,
.mask-add-grid,
.mask-workflow {
  display: grid;
  gap: 8px;
}

.crop-action-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.guide-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mask-add-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mask-workflow {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.recipe-action-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.crop-action-grid button,
.guide-grid button,
.recipe-action-grid button,
.mask-add-grid button,
.mask-workflow button {
  min-height: 34px;
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  color: #dce9e7;
  background: #081415;
  font-size: 11px;
  font-weight: 850;
}

.crop-action-grid button.is-active,
.guide-grid button.is-active,
.mask-workflow button.is-active {
  border-color: rgba(12, 143, 135, .94);
  color: #ffffff;
  background: rgba(12, 143, 135, .88);
}

.mask-list {
  display: grid;
  gap: 8px;
}

.mask-empty {
  padding: 10px;
  border: 1px dashed rgba(255, 255, 255, .16);
  border-radius: var(--radius);
  color: var(--muted-dark);
  font-size: 12px;
  font-weight: 800;
}

.mask-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.mask-main,
.mask-row > button {
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  color: #dce9e7;
  background: #081415;
  font-size: 11px;
  font-weight: 850;
}

.mask-main {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 9px 10px;
  text-align: left;
}

.mask-main strong,
.mask-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mask-main small {
  color: var(--muted-dark);
}

.mask-row > button:not(.mask-main) {
  min-width: 46px;
}

.mask-row.is-active .mask-main {
  border-color: rgba(12, 143, 135, .94);
  background: rgba(12, 143, 135, .2);
}

.mask-row.is-muted {
  opacity: .55;
}

.recipe-name-input {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  color: #ffffff;
  background: #081415;
  font-size: 13px;
  font-weight: 800;
}

.recipe-list {
  display: grid;
  gap: 8px;
}

.recipe-empty {
  padding: 10px;
  border: 1px dashed rgba(255, 255, 255, .16);
  border-radius: var(--radius);
  color: var(--muted-dark);
  font-size: 12px;
  font-weight: 800;
}

.recipe-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.recipe-main,
.recipe-row > button {
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  color: #dce9e7;
  background: #081415;
  font-size: 11px;
  font-weight: 850;
}

.recipe-main {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 9px 10px;
  text-align: left;
}

.recipe-main strong,
.recipe-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recipe-main small {
  color: var(--muted-dark);
}

.recipe-row > button:not(.recipe-main) {
  min-width: 52px;
}

.recipe-row.is-active .recipe-main {
  border-color: rgba(12, 143, 135, .94);
  background: rgba(12, 143, 135, .2);
}

.odin-tool-list {
  gap: 10px;
}

.odin-tool-card {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  background: rgba(8, 20, 21, .72);
}

.odin-tool-card.is-active {
  border-color: rgba(12, 143, 135, .8);
  background:
    linear-gradient(180deg, rgba(12, 143, 135, .18), rgba(8, 20, 21, .7));
}

.odin-tool-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.odin-tool-head strong {
  overflow: hidden;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.odin-tool-head span {
  padding: 4px 7px;
  border: 1px solid rgba(200, 154, 74, .28);
  border-radius: var(--radius);
  color: #efd8aa;
  background: rgba(200, 154, 74, .1);
  font-size: 10px;
  font-weight: 850;
}

.odin-tool-card button {
  min-height: 34px;
  border: 1px solid rgba(12, 143, 135, .35);
  border-radius: var(--radius);
  color: #ffffff;
  background: rgba(12, 143, 135, .86);
  font-size: 12px;
  font-weight: 900;
}

.full-width {
  width: 100%;
}

.transform-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.export-card {
  display: grid;
  gap: 12px;
  margin-top: 2px;
  padding: 14px;
  border: 1px solid rgba(200, 154, 74, .3);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(200, 154, 74, .13), rgba(255, 255, 255, .04));
}

.export-card.standalone {
  margin: 0;
}

.export-card .section-title span {
  color: var(--muted-dark);
}

.export-profile-grid,
.export-version-grid {
  display: grid;
  gap: 8px;
}

.export-profile-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.export-profile-grid button,
.export-version-grid label {
  min-height: 34px;
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  color: #dce9e7;
  background: #081415;
  font-size: 11px;
  font-weight: 850;
}

.export-profile-grid button.is-active {
  border-color: rgba(12, 143, 135, .94);
  color: #ffffff;
  background: rgba(12, 143, 135, .88);
}

.export-version-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.export-version-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
}

.export-version-grid input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.export-progress {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(12, 143, 135, .26);
  border-radius: var(--radius);
  background: rgba(12, 143, 135, .08);
}

.export-progress span {
  color: var(--muted-dark);
  font-size: 12px;
  font-weight: 850;
}

.export-progress div {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
}

.export-progress i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width .18s ease;
}

.status-line {
  margin: 0;
  color: var(--muted-dark);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.4;
}

@media (max-width: 1240px) {
  .topbar {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .top-actions {
    justify-self: start;
    flex-wrap: wrap;
  }

  .studio-shell {
    grid-template-columns: minmax(260px, .34fr) minmax(420px, .66fr);
  }

  .inspector-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  html,
  body {
    overflow-x: hidden;
  }

  .studio-shell {
    grid-template-columns: 1fr;
  }

  .main-nav {
    width: 100%;
    overflow-x: auto;
  }

  .top-actions {
    width: 100%;
  }

  .top-actions .primary-button,
  .top-actions .secondary-button {
    flex: 1 1 160px;
  }

  .canvas-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .canvas-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
  }

  .tool-button {
    width: 100%;
  }

  .photo-stage {
    min-height: 380px;
    padding: 12px;
    overflow: hidden;
  }

  .under-canvas {
    grid-template-columns: 1fr;
  }

  .preset-strip {
    max-width: 100%;
    grid-auto-columns: minmax(126px, 150px);
  }
}

@media (max-width: 520px) {
  .topbar,
  .studio-shell {
    padding-inline: 12px;
  }

  .brand-copy strong {
    font-size: 19px;
  }

  .nav-link {
    min-width: 84px;
  }

  .metric-grid,
  .tab-grid,
  .format-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hsl-swatch-grid,
  .grade-preset-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .canvas-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
