/* Vial Studio — standalone minimalist cream workspace stylesheet. */
:root {
  --paper: #faf6ed;
  --surface: #fffcf6;
  --surface-alt: #f4eee3;
  --surface-muted: #efe7d8;
  --ink: #25221e;
  --ink-soft: #433d35;
  --muted: #746a5e;
  --line: #e2d8c7;
  --line-strong: #cfc2ae;
  --highlight: #e9d7b8;
  --accent: #9b7b4e;
  --warn-bg: #fff2dc;
  --warn-ink: #7b481c;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.45;
}

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

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button,
a {
  touch-action: manipulation;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

button:disabled {
  opacity: 0.36;
  cursor: not-allowed;
}

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

em,
i {
  font-style: normal;
}

h1,
h2,
h3 {
  font-family: inherit;
  margin: 0;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--highlight);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid #756856;
  outline-offset: 2px;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #6f6251;
  outline-offset: 0;
  border-color: #8b7b66;
}

.skip {
  position: fixed;
  top: 8px;
  left: 8px;
  transform: translateY(-160%);
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  z-index: 100;
}

.skip:focus {
  transform: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.shell {
  width: min(1340px, calc(100% - 48px));
  margin: 0 auto;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.8px;
  white-space: nowrap;
}

.wordmark > span:not(.brand-icon) {
  font-weight: 400;
  color: var(--ink-soft);
}

.brand-icon {
  display: none;
}

.header nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.text-button {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
  transition: background 0.15s, color 0.15s;
}

.text-button:hover {
  background: var(--surface-muted);
  color: var(--ink);
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  min-height: 38px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
  white-space: nowrap;
}

.button:hover:not(:disabled) {
  background: var(--surface-muted);
}

.button.dark {
  background: var(--ink);
  border-color: var(--ink);
  color: #faf7f0;
}

.button.dark:hover:not(:disabled) {
  background: #3b3630;
  border-color: #3b3630;
}

.button.full {
  width: 100%;
  justify-content: space-between;
  padding: 12px 18px;
  min-height: 44px;
  margin-top: 20px;
  font-size: 13px;
}

.button > span {
  font-size: 15px;
  line-height: 1;
}

/* Studio Workspace */
.studio-section {
  padding: 16px 0 32px;
}

.studio-section .section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 12px;
}

.studio-section h1,
.studio-section h2 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.1px;
  color: var(--ink-soft);
  margin: 0;
}

.draft-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}

.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6f7a5c;
}

.studio {
  display: grid;
  grid-template-columns: 348px minmax(0, 1fr);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(44, 38, 30, 0.04);
}

/* Controls Column */
.controls {
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}

.control-tabs {
  display: flex;
  height: 52px;
  border-bottom: 1px solid var(--line);
  background: #f8f3e8;
}

.control-tabs button {
  flex: 1;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: color 0.15s, background 0.15s;
}

.control-tabs button:hover {
  color: var(--ink);
}

.control-tabs button[aria-selected="true"] {
  color: var(--ink);
  font-weight: 600;
  border-bottom-color: var(--ink);
  background: var(--surface);
}

#design-panel,
#print-panel {
  padding: 18px 22px 24px;
}

label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-soft);
  margin: 15px 0 6px;
}

#design-panel > label:first-child,
#print-panel > label:first-child {
  margin-top: 2px;
}

input:not([type="color"], [type="file"], [type="checkbox"]),
select,
textarea {
  display: block;
  width: 100%;
  min-height: 38px;
  padding: 8px 11px;
  font-size: 13px;
  color: var(--ink);
  background: #fffdf9;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s;
}

input:not([type="color"], [type="file"], [type="checkbox"]):hover,
select:hover,
textarea:hover {
  border-color: var(--line-strong);
}

textarea {
  resize: vertical;
  line-height: 1.45;
  min-height: 68px;
}

input::placeholder,
textarea::placeholder {
  color: #a39786;
}

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

.color-input {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 5px 9px;
  background: #fffdf9;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.color-input input[type="color"] {
  padding: 0;
  width: 22px;
  height: 22px;
  border: 0;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}

.color-input span {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
  color: var(--muted);
}

.swatches {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 9px;
}

.swatches button {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--swatch);
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 1px var(--line-strong);
  transition: transform 0.12s, box-shadow 0.12s;
}

.swatches button:hover {
  transform: scale(1.08);
}

.swatches button[aria-pressed="true"] {
  box-shadow: 0 0 0 2px var(--ink);
}

.upload-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.upload-button {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  padding: 8px 12px;
  min-height: 34px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
  background: #faf5eb;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.upload-button:hover {
  background: var(--surface-muted);
  border-color: #a89982;
}

.upload-button > span {
  font-size: 13px;
  color: var(--ink);
}

.upload-row:focus-within .upload-button {
  outline: 2px solid #6f6251;
}

.remove-logo {
  font-size: 11px;
  color: #964532;
  padding: 6px 8px;
}

summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  user-select: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary > span {
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
  transition: transform 0.15s;
}

details[open] > summary > span {
  transform: rotate(45deg);
}

.back-fields {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 14px;
}

.back-fields label {
  margin-top: 12px;
}

/* Print Panel */
.size-card {
  border: 1px solid var(--line);
  background: #f7f1e5;
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 16px;
}

.size-card > span {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  color: var(--muted);
}

.size-card > b {
  display: block;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.8px;
  margin: 4px 0 6px;
}

.size-card p {
  font-size: 12px;
  color: var(--ink-soft);
  margin: 0;
}

.size-card small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.price-row span {
  color: var(--muted);
}

.price-row b {
  font-weight: 600;
}

.field-help {
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
  margin: 10px 0 0;
}

.centered {
  text-align: center;
}

/* Preview Panel */
.preview-panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
}

.preview-toolbar {
  height: 52px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}

.toolbar-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--muted);
}

.preview-toolbar > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  font-size: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  color: var(--ink-soft);
  transition: background 0.15s, border-color 0.15s;
}

.icon-button:hover:not(:disabled) {
  background: var(--surface-alt);
  border-color: var(--line);
}

.save-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 13px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: background 0.15s;
}

.save-button:hover {
  background: var(--surface-alt);
}

.preview-stage {
  position: relative;
  height: 460px;
  min-height: 460px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 68% 58% at 50% 44%, #fdfaf3 0%, #f4ede0 62%, #ebe1cf 100%);
  overflow: hidden;
}

.preview-switch {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  padding: 3px;
  background: rgba(255, 252, 246, 0.9);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  border-radius: 7px;
  z-index: 3;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(44, 38, 30, 0.04);
}

.preview-switch button {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 5px;
  transition: background 0.15s, color 0.15s;
}

.preview-switch button:hover:not(:disabled) {
  color: var(--ink);
}

.preview-switch button[aria-pressed="true"] {
  background: #e8dece;
  color: var(--ink);
  font-weight: 600;
}

.vial-canvas {
  position: absolute;
  inset: 42px 0 54px;
  cursor: grab;
  touch-action: none;
  outline-offset: -4px;
}

.vial-canvas:active {
  cursor: grabbing;
}

.vial-canvas canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.vial-canvas:focus-visible {
  outline: 2px solid #9b8b73;
}

.rotation-tools {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  z-index: 3;
}

.rotation-tools button {
  min-height: 32px;
  min-width: 34px;
  font-size: 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: rgba(255, 252, 246, 0.92);
  color: var(--ink-soft);
  transition: background 0.15s;
}

.rotation-tools #spin {
  font-size: 11px;
  font-weight: 500;
  padding: 0 14px;
  min-width: 100px;
}

.rotation-tools button:hover {
  background: #e8dece;
  color: var(--ink);
}

.preview-stage-note {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--muted);
  max-width: 90%;
  text-align: center;
  pointer-events: none;
}

.flat-preview {
  width: 84%;
  max-width: 580px;
  max-height: 310px;
  box-shadow: 0 12px 32px rgba(44, 38, 30, 0.1);
  border: 1px solid var(--line);
  background: #fff;
}

.flat-preview svg {
  width: 100%;
  max-height: 310px;
  height: auto;
  display: block;
}

/* Wrap & Fit Bar */
.wrap-spec {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 13px 22px;
  background: #faf5eb;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.wrap-spec > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wrap-spec p {
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  margin: 0;
  color: var(--ink-soft);
}

.wrap-spec p.overlap {
  color: #934a28;
}

.wrap-spec details {
  margin-left: auto;
}

.wrap-spec details[open] {
  width: 100%;
  margin-left: 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.wrap-spec summary {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  display: inline-flex;
  float: right;
}

.wrap-spec details[open] summary {
  float: none;
  margin-bottom: 10px;
}

.wrap-spec small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin: 4px 0 8px;
}

.wrap-spec label {
  display: inline-block;
  font-size: 11px;
  margin: 8px 10px 4px 0;
}

.wrap-spec input {
  display: inline-block;
  max-width: 120px;
  margin-right: 18px;
}

.wrap-spec details p {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 10px;
}

/* Interactive Flat Artwork Section */
.proof-section {
  padding: 20px 24px 24px;
  background: var(--surface);
}

.proof-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 14px;
  gap: 10px;
}

.proof-heading span + span {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.proof-button {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 0;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 2px 10px rgba(44, 38, 30, 0.04);
}

.proof-button svg {
  width: 100%;
  height: auto;
  display: block;
}

.proof-zones {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 27% 33% 20% 20%;
}

.proof-zones button {
  padding: 0;
  border-radius: 0;
  border: 1px solid transparent;
  cursor: text;
  transition: background 0.12s, border-color 0.12s;
}

.proof-zones button:hover,
.proof-zones button:focus-visible {
  border: 1px dashed #9b8b73;
  background: rgba(179, 145, 98, 0.08);
  outline: none;
}

.fit-warning {
  font-size: 12px;
  background: var(--warn-bg);
  border: 1px solid #eccfa2;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--warn-ink);
  line-height: 1.5;
  margin: 14px auto 0;
  max-width: 560px;
}

/* Dialogs & Modals */
dialog {
  width: min(620px, calc(100% - 32px));
  max-height: 90dvh;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 24px 28px 28px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(31, 28, 24, 0.24);
}

dialog::backdrop {
  background: rgba(36, 32, 27, 0.45);
  backdrop-filter: blur(4px);
}

.modal-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.eyebrow {
  font-size: 10px;
  letter-spacing: 1.4px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
}

dialog h2 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.6px;
  margin: 4px 0 12px;
}

dialog p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 14px;
}

.modal-proof {
  background: #EFE7D8;
  padding: 24px;
  border-radius: var(--radius-md);
  margin: 16px 0;
  border: 1px solid var(--line);
}

.modal-proof svg {
  width: 100%;
  height: auto;
  display: block;
  box-shadow: 0 4px 16px rgba(44, 38, 30, 0.08);
}

.print-help {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  margin: 14px 0;
}

.print-help p {
  font-size: 12px;
  margin: 10px 0 0;
}

.print-help a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.review-rows > div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.review-rows span {
  color: var(--muted);
}

.review-rows b {
  font-weight: 600;
  text-align: right;
}

.review-check {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.5;
  margin-top: 18px;
  cursor: pointer;
}

.review-check input {
  width: 16px !important;
  min-height: 16px !important;
  margin: 2px 0 0;
  flex-shrink: 0;
}

.modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.saved-card {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 16px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 16px 0;
}

.saved-card svg {
  width: 110px;
  height: auto;
  display: block;
  border: 1px solid var(--line);
}

.saved-card h3 {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 4px;
}

.saved-card p {
  font-size: 11px;
  margin: 0;
}

.saved-card > div:last-child {
  display: flex;
  align-items: center;
  gap: 10px;
}

.saved-card button {
  font-size: 12px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
}

.saved-card button:hover {
  background: var(--surface-muted);
}

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 11px 20px;
  background: var(--ink);
  color: #faf7f0;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(31, 28, 24, 0.22);
  z-index: 100;
  max-width: calc(100% - 32px);
  text-align: center;
}

/* Responsive Breakpoints */
@media (min-width: 1100px) {
  .preview-stage {
    height: 500px;
    min-height: 500px;
  }
  .proof-section {
    padding: 24px 36px 28px;
  }
}

@media (max-width: 920px) {
  .shell {
    width: calc(100% - 32px);
  }
  .studio {
    grid-template-columns: 300px minmax(0, 1fr);
  }
  #design-panel,
  #print-panel {
    padding: 14px 16px 20px;
  }
  .preview-toolbar {
    padding: 0 16px;
  }
  .proof-section {
    padding: 18px;
  }
}

@media (max-width: 720px) {
  .header {
    height: 56px;
    gap: 10px;
  }
  .wordmark {
    font-size: 19px;
  }
  .header-actions {
    gap: 6px;
  }
  .text-button {
    font-size: 11px;
    padding: 5px 8px;
  }
  .studio {
    grid-template-columns: 1fr;
  }
  .controls {
    border-right: 0;
  }
  .preview-panel {
    grid-row: 1;
    border-bottom: 1px solid var(--line);
  }
  .preview-stage {
    height: 370px;
    min-height: 370px;
  }
  .vial-canvas {
    inset: 40px 0 54px;
  }
  .preview-switch button {
    padding: 6px 11px;
  }
  .saved-card {
    grid-template-columns: 88px 1fr;
    gap: 12px;
  }
  .saved-card svg {
    width: 88px;
  }
  .saved-card > div:last-child {
    grid-column: 2;
  }
  dialog {
    padding: 20px;
  }
  .modal-actions .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
.template-browser{margin-top:12px;border-bottom:1px solid var(--line);padding:10px 0 14px}.template-browser summary{font-size:12px}#template-gallery{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:14px}#template-gallery button{padding:10px 7px;background:#f5efe4;border:1px solid transparent;border-radius:6px;text-align:left;min-width:0}#template-gallery button[aria-pressed=true]{border-color:#38342d;background:#eee4d4}#template-gallery svg{width:100%;height:auto;display:block}#template-gallery b{display:block;font-size:10px;font-weight:500;margin-top:8px}
/* Direct artwork manipulation. Handles never enter the print SVG. */
.artwork-tools { display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin:0 0 12px; }
.artwork-tools select { flex:1; min-width:110px; width:auto; margin:0; }
.artwork-tools button,.artwork-tools select { font-size:11px; padding:8px 10px; min-height:34px; border:1px solid var(--line-strong); border-radius:5px; background:var(--paper); }
.object-scale { display:flex; align-items:center; gap:2px; margin:0; font-size:11px; }
.object-scale input { width:58px; padding:8px 4px; margin:0; min-height:34px; font-size:11px; }
#proof-edit { touch-action:none; user-select:none; outline-offset:5px; overflow:visible; }
#artwork-handles { position:absolute; inset:0; pointer-events:none; }
#artwork-handles .object-hit { position:absolute; pointer-events:auto; cursor:move; padding:0; margin:0; min-height:0; min-width:0; background:transparent; border:1px solid transparent; border-radius:0; }
#artwork-handles .object-hit:hover { border-color:#a8987b; background:#a8987b10; }
#artwork-handles .object-hit.selected { border:1px solid #806c48; }
#artwork-handles .object-resize { position:absolute; pointer-events:auto; transform:translate(-50%,-50%); width:12px; height:12px; min-height:0; min-width:0; padding:0; background:#fffdf8; border:2px solid #806c48; border-radius:2px; cursor:nwse-resize; }
