@import url('base.css');
/* Hallmark · component: studio actions · genre: editorial · theme: existing Emonse.
   Pre-emit critique: P4 H5 E4 S5 R5 V4.
   2026-09-28: quiet action rows and label motion replace white hover panels. */
html {
  scroll-behavior: auto;
  scrollbar-gutter: stable;
}
body {
  background: var(--paper);
}
[hidden] {
  display: none !important;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button {
  border: 1px solid var(--line);
  background: transparent;
  min-height: 44px;
  cursor: pointer;
  padding: 10px 14px;
}
.button-label,
.font-name,
.layer-title {
  display: inline-block;
  transform-origin: left center;
  transition: transform 180ms var(--ease);
}
.add-tools .button-label,
.selection-actions .button-label,
.workspace-actions .button-label {
  transform-origin: center;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
:is(button, a, input, select, textarea):focus-visible {
  outline: 2px solid #386080;
  outline-offset: 3px;
}
button[aria-pressed='true'] {
  background: var(--ink);
  color: var(--light);
  border-color: var(--ink);
}
/* Keep the original logo's intrinsic ratio when reducing it. The fixed-height cover
   box plus wrapper blending produced visibly jagged edges in the studio header.
   Blend the image against the header's solid backdrop instead. */
.studio-header {
  position: relative;
  height: 88px;
  padding: 16px 3vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  mix-blend-mode: normal;
}
.studio-brand {
  display: flex;
  align-items: center;
  width: 220px;
  height: 52px;
  overflow: hidden;
  flex-shrink: 0;
}
.studio-brand img {
  display: block;
  width: 100%;
  height: auto;
  mix-blend-mode: multiply;
}
.studio-heading {
  font-size: 11px;
  letter-spacing: 0.17em;
}
.studio-heading span {
  color: var(--muted);
}
.studio-back {
  /* 2026-09-28: the quiet top-right link was missed; place a clear return control
     above every product workspace while retaining its variant-specific destination. */
  font-size: 12px;
  font-weight: 500;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 4px;
  white-space: nowrap;
  text-decoration: none;
  transition: border-color 180ms var(--ease);
}
.studio-back svg {
  flex: none;
  transition: transform 180ms var(--ease);
}
.studio-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  min-height: calc(100dvh - 88px);
}
.workspace {
  padding: 32px 4vw 20px;
  background: #e5e3df;
  min-width: 0;
  position: sticky;
  top: 0;
  align-self: start;
}
.workspace-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 14px;
  gap: 16px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.17em;
  font-weight: 600;
  margin: 0 0 12px;
}
.workspace h1 {
  font: 400 clamp(32px, 3.5vw, 62px)/1.05 var(--display);
  letter-spacing: -0.06em;
  margin: 0;
}
.dimension {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
  text-align: right;
}
.canvas-surround {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 28px 0 35px;
  min-height: 260px;
}
#canvas-scroll {
  width: min(100%, calc(100dvh - 330px), 780px);
  aspect-ratio: var(--frame-ratio, 1);
  overflow: auto;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}
#canvas-scroll:not([data-zoomed='true']) {
  overflow: hidden;
}
#canvas-mount {
  width: 100%;
  aspect-ratio: var(--frame-ratio, 1);
  filter: drop-shadow(0 12px 12px #00000024);
}
#canvas-scroll[data-pan='true'] {
  cursor: grab;
  touch-action: none;
}
#canvas-scroll[data-pan='true']:active {
  cursor: grabbing;
}
#canvas-scroll[data-pan='true'] .canvas-container {
  pointer-events: none;
}
body[data-wide-product='true'] #canvas-scroll,
body[data-wide-product='true'] .canvas-ruler {
  width: min(100%, 1400px);
}
body[data-wide-product='true'] .canvas-surround {
  min-height: 0;
  padding-top: 16px;
}
.view-tools {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  margin: 0 0 16px;
}
.view-tools button {
  font-size: 12px;
  min-width: 44px;
}
.view-tools output {
  min-width: 42px;
  text-align: center;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.material-choice {
  margin-bottom: 24px;
}
.finish-options label {
  flex-direction: column;
  position: relative;
}
.finish-options label > input {
  position: absolute;
  top: 18px;
  left: 16px;
}
.finish-options label > span {
  min-width: 0;
}
.finish-options img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  margin-bottom: 10px;
}
.material-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.material-options label {
  display: flex;
  gap: 8px;
  align-items: start;
  padding: 12px 10px;
  border: 1px solid var(--line);
  cursor: pointer;
  margin: 0;
  font-size: 12px;
}
.material-options label:has(input:checked) {
  border-color: var(--ink);
  background: #24243b08;
}
.material-options input[type='radio'] {
  width: 15px;
  height: 15px;
  margin: 1px 0 0;
  flex: 0 0 15px;
  accent-color: var(--ink);
}
.material-options small {
  display: block;
  margin-top: 6px;
  font-size: 10px;
  color: var(--muted);
  line-height: 1.5;
}
.canvas-container {
  max-width: 100%;
}
.upper-canvas {
  touch-action: none;
}
.canvas-ruler {
  position: absolute;
  bottom: 8px;
  width: min(100%, calc(100dvh - 330px), 780px);
  text-align: center;
  padding-top: 7px;
  font-size: 10px;
  color: var(--muted);
}
.canvas-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  background: #e5e3df;
  color: var(--muted);
}
.workspace-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 15px;
}
.workspace-actions > div {
  display: flex;
  gap: 6px;
}
.workspace-actions button {
  font-size: 11px;
}
.workspace-actions > div button {
  font-size: 22px;
  min-width: 44px;
  padding: 6px;
}
.preview-note {
  font-size: 10px;
  color: var(--muted);
  margin: 16px 0 0;
  line-height: 1.6;
}
.tools {
  padding: 32px 28px 24px;
  border-left: 1px solid var(--line);
  min-width: 0;
}
.tools h2 {
  font: 400 31px/1.15 var(--display);
  letter-spacing: -0.04em;
  margin: 0 0 12px;
}
.tools-title > p:last-child {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 24px;
}
fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.add-tools {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.add-tools button {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  height: 112px;
  font-size: 12px;
}
.type-icon {
  font:
    italic 38px Georgia,
    serif;
}
.upload-icon {
  font-size: 38px;
  line-height: 1;
}
.file-hint {
  font-size: 10px;
  color: var(--muted);
  margin: 10px 0 28px;
  line-height: 1.7;
}
.arc-hint {
  font-size: 10px;
  line-height: 1.7;
  color: var(--muted);
  margin: 6px 0 18px;
}
body[data-product='brass-coin'] .workspace {
  background: #e7e3db;
}
.layers-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}
.layers-heading h3 {
  font-size: 12px;
  font-weight: 600;
  margin: 0;
}
.layers-heading span {
  color: var(--muted);
  font-size: 11px;
}
.layer-list {
  display: grid;
  gap: 6px;
  padding-block: 10px;
}
.layer-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--paper);
}
.layer-row[data-selected='true'] {
  background: var(--ink);
  color: var(--light);
  border-color: var(--ink);
}
.layer-row button {
  border: 0;
  padding: 8px;
  color: inherit;
  min-width: 0;
  background: transparent;
}
.layer-row .layer-select {
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  font-size: 12px;
}
.layer-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.layer-kind {
  font-size: 10px;
  opacity: 0.7;
  flex-shrink: 0;
}
.layer-row svg {
  width: 18px;
  height: 18px;
  display: block;
  margin: auto;
  pointer-events: none;
}
.layer-row .layer-handle {
  cursor: grab;
  touch-action: none;
}
.layer-row.dragging {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  box-shadow: 0 5px 12px #0002;
  z-index: 1;
}
.layer-row.dragging .layer-handle {
  cursor: grabbing;
}
.layer-row .layer-delete:hover:not(:disabled) {
  color: #b32c39;
}
.layer-row[data-selected='true'] .layer-delete:hover:not(:disabled) {
  color: #ffbfc5;
}
.layer-hint {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 18px;
}
.font-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.font-choice {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  min-height: 84px;
  padding: 12px;
  background: transparent;
  text-align: left;
}
.font-sample {
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 400 28px/1.5 var(--sample-font);
  font-synthesis: none;
}
.font-name {
  font: 400 10px/1.4 var(--body);
  opacity: 0.75;
}
.field-label {
  font-size: 11px;
  color: var(--muted);
  margin: 14px 0 6px;
}
.empty-state {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  margin: 4px 0 24px;
}
label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin: 14px 0 6px;
}
input:not([type='checkbox']):not([type='range']),
textarea,
select {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 11px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--light);
  border-radius: 0;
}
textarea {
  resize: vertical;
  line-height: 1.6;
  max-height: 160px;
}
input[type='range'] {
  width: 100%;
  accent-color: var(--ink);
  min-height: 32px;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}
input[type='checkbox'] {
  width: 18px;
  height: 18px;
  accent-color: var(--ink);
}
label output {
  float: right;
}
.position-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
}
.selection-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.selection-actions button {
  flex: 1;
  font-size: 11px;
}
.area-note {
  font-size: 10px;
  line-height: 1.6;
  color: var(--muted);
  margin: 14px 0;
}
.studio-status {
  font-size: 12px;
  line-height: 1.6;
  min-height: 38px;
  margin: 16px 0 12px;
}
.studio-status[data-state='error'] {
  color: #942e2e;
  border-left: 2px solid #942e2e;
  padding-left: 10px;
}
.studio-status[data-state='success'] {
  color: #2e624b;
}
body[aria-busy='true'] .studio-status {
  opacity: 0.65;
}
body[aria-busy='true'] .canvas-container,
body[data-recovery-blocked='true'] .canvas-container {
  pointer-events: none;
}
.save-panel {
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.primary {
  background: var(--ink);
  color: var(--light);
  border-color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  min-height: 56px;
  font-size: 13px;
}
.primary svg,
.design-action svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#save-state,
.sales-note {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.7;
}
#save-state {
  margin: 12px 0 20px;
}
.design-actions {
  border-top: 1px solid var(--line);
}
.design-action {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 12px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 12px;
}
.action-arrow {
  margin-left: auto;
  color: var(--muted);
}
.sales-note {
  margin: 20px 0 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
dialog {
  width: min(760px, calc(100vw - 24px));
  max-height: 90dvh;
  padding: 24px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--paper);
}
dialog::backdrop {
  background: #090b0dbd;
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.dialog-heading h2 {
  margin: 0;
  font: 400 28px var(--display);
  letter-spacing: -0.04em;
}
dialog > p {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}
.draft-row {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 14px 0;
}
.draft-row img {
  width: 70px;
  height: 70px;
  object-fit: contain;
}
.draft-row p {
  margin: 3px 0;
  font-size: 11px;
  overflow-wrap: anywhere;
}
.draft-actions {
  display: flex;
  gap: 8px;
}
.draft-actions button {
  font-size: 11px;
}
html.studio-modal-open {
  overflow: hidden;
}
@media (hover: hover) {
  button:hover:not(:disabled) > .button-label,
  .font-choice:hover:not(:disabled) .font-name,
  .layer-select:hover:not(:disabled) .layer-title {
    transform: scale(1.04);
  }
  .studio-back:hover {
    border-color: var(--ink);
  }
  .studio-back:hover svg {
    transform: translateX(-3px);
  }
}
@media (max-width: 1000px) {
  .studio-layout {
    grid-template-columns: minmax(0, 1fr) 335px;
  }
  .tools {
    padding: 26px 20px;
  }
  .workspace {
    padding: 28px 24px 20px;
  }
}
@media (max-width: 760px) {
  .studio-header {
    height: 72px;
    padding: 12px 20px;
    gap: 12px;
  }
  .studio-brand {
    width: 180px;
    height: 44px;
  }
  .studio-heading {
    display: none;
  }
  .studio-layout {
    display: block;
  }
  .workspace {
    position: relative;
    padding: 26px 20px 18px;
  }
  .tools {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 28px 20px;
  }
  #canvas-scroll,
  .canvas-ruler {
    width: min(100%, 540px);
  }
  .workspace h1 {
    font-size: 42px;
  }
  .canvas-surround {
    padding-top: 22px;
  }
  .workspace-actions {
    gap: 8px;
  }
  .workspace-actions button {
    padding: 9px;
  }
  .draft-row {
    grid-template-columns: 55px minmax(0, 1fr);
    gap: 10px;
  }
  .draft-actions {
    grid-column: 2;
  }
  .draft-row img {
    width: 55px;
    height: 55px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
  .button-label,
  .font-name,
  .layer-title,
  .studio-back svg {
    transform: none !important;
  }
}

/* 2026-09-28: material preview is a deliberate final step, separate from editing. */
.relief-panel {
  padding: 25px 0;
  margin: 4px 0 24px;
  border-block: 1px solid var(--line);
}
.relief-panel h3 {
  font-size: 24px;
  font-weight: 400;
  margin: 8px 0 12px;
}
.relief-panel p:not(.eyebrow) {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}
#relief-generate {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 18px 20px;
  margin-top: 18px;
  background: #292820;
  color: #f3e3be;
  border-color: #292820;
}
#relief-generate:hover {
  background: #292820;
}
.relief-dialog {
  width: min(1160px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: clamp(16px, 3vw, 30px);
  overflow: auto;
  background: #eeece8;
  color: #24243b;
  border: 1px solid #c9c3b9;
}
.relief-dialog::backdrop {
  background: rgb(16 17 20 / 75%);
  backdrop-filter: blur(5px);
}
.relief-dialog .dialog-heading {
  gap: 18px;
  align-items: start;
}
.relief-dialog h2 {
  margin: 8px 0 0;
  font-size: clamp(25px, 3vw, 38px);
  font-weight: 400;
}
.relief-dialog .eyebrow {
  font-size: 10px;
  letter-spacing: 0.16em;
}
.relief-result {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 24px;
}
.relief-result[hidden],
.relief-loading[hidden],
.relief-panel[hidden],
.relief-visual [hidden] {
  display: none;
}
.relief-result figure {
  margin: 0;
}
.relief-result img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  display: block;
}
.relief-source {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 18px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.relief-source img {
  width: 72px;
}
.relief-card {
  padding: 12px;
  border: 1px solid var(--line);
}
.relief-card.is-selected {
  border-color: #24243b;
}
.relief-visual {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: #e5e1d8;
}
.relief-visual p {
  padding: 20px;
  font-size: 13px;
  color: var(--muted);
}
.relief-card h3 {
  margin: 18px 6px 6px;
  font-size: 24px;
  font-weight: 400;
}
.relief-card > p {
  margin: 0 6px 18px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}
.relief-card button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 15px;
}
.relief-card button[aria-pressed='true'] {
  background: #24243b;
  color: #eeece8;
  border-color: #24243b;
}
.relief-check {
  visibility: hidden;
}
[aria-pressed='true'] > .relief-check {
  visibility: visible;
}
#relief-selection {
  font-weight: 600;
}
.relief-source figcaption {
  font-size: 11px;
  line-height: 1.6;
  margin-top: 8px;
  color: var(--muted);
}
.relief-message {
  font-size: 12px;
  line-height: 1.7;
  max-width: 700px;
  margin: 20px 0 0;
}
.relief-loading {
  min-height: 80px;
  display: grid;
  place-items: center;
}
.relief-loading span {
  width: 30px;
  height: 30px;
  border: 1px solid #a88847;
  border-top: 3px solid #3c3019;
  border-radius: 50%;
  animation: relief-turn 2s linear infinite;
}
@keyframes relief-turn {
  to {
    transform: rotate(360deg);
  }
}
@media (max-width: 600px) {
  .relief-result {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .relief-dialog .dialog-heading {
    flex-wrap: wrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  .relief-loading span {
    animation: none;
  }
}
/* 2026-09-28: account login opens separately to preserve an unsaved editor. */
.studio-account-link {
  font-size: 12px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.account-lock-note {
  padding: 40px;
  max-width: 700px;
  line-height: 1.7;
}
#save-account {
  border: 1px solid var(--ink);
  padding: 15px;
  width: 100%;
  min-height: 48px;
  margin-top: 10px;
}
.studio-layout[hidden] {
  display: none !important;
}
