/* The tool's own shell, in Above Yellow's palette (app/globals.css): achromatic
   grey on white, --mark only on the wordmark. Colour on this page belongs to
   the card: the foil and paper swatches show what the card will be. */
:root {
  --ink: #0a0a0a;
  --ink-2: #404040;
  --ink-3: #737373;
  --surface: #fff;
  --tint: #f5f5f5;
  --hairline: rgba(10, 10, 10, .1);
  --hairline-strong: rgba(10, 10, 10, .18);
  --mark: rgb(255, 153, 0);
  --radius: 12px;
  --gutter: clamp(16px, 3.4vw, 40px);
}
* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--surface); color: var(--ink); font: 400 16px/1.5 Geist, system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; color: inherit; }
.shell { width: min(1360px, 100% - 2 * var(--gutter)); margin: 0 auto; }

.top { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; }
.wordmark { font-weight: 700; font-size: 19px; letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.wordmark span::after { content: "."; color: var(--mark); }
.back { color: var(--ink-2); font-size: 15px; text-decoration: none; }
.back:hover { color: var(--ink); text-decoration: underline; }

.studio { display: grid; gap: 20px; padding-bottom: 48px; }
.preview { position: relative; display: flex; flex-direction: column; background: var(--tint); border-radius: 20px; overflow: hidden; height: min(68svh, 620px); }
@media (min-width: 960px) {
  .studio { grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; align-items: start; }
  .preview { position: sticky; top: 12px; height: calc(100vh - 88px); min-height: 520px; }
}
.stage { flex: 1; min-height: 0; }
.preview-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 14px 12px; }
.tip { font-size: 13px; color: var(--ink-3); }
.preview-actions { display: flex; gap: 6px; }
.drop-veil { position: absolute; inset: 10px; border: 2px dashed var(--ink-3); border-radius: 14px; display: none; place-items: center; font-weight: 600; background: rgba(245, 245, 245, .85); z-index: 5; }
.preview.dragover .drop-veil { display: grid; }

.panel h1 { font-size: 30px; line-height: 1.1; letter-spacing: -.03em; font-weight: 700; }
.lede { color: var(--ink-2); margin-top: 8px; }
.block { padding: 22px 0; border-top: 1px solid var(--hairline); }
.panel > .block:first-of-type { margin-top: 20px; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
h2 { font-size: 17px; line-height: 1.25; letter-spacing: -.01em; font-weight: 700; display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.block-head h2 { margin-bottom: 0; }
.block-head + * { margin-top: 12px; }
h2 .n { width: 22px; height: 22px; display: inline-grid; place-items: center; border-radius: 6px; background: var(--ink); color: #fff; font-size: 12px; flex: none; }
h2 .now { font-weight: 500; color: var(--ink-3); font-size: 15px; }
.label { font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 16px 0 8px; display: block; }
.hint { font-size: 13px; color: var(--ink-3); margin-top: 8px; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--hairline-strong); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 15px; cursor: pointer; transition: background .15s, border-color .15s; }
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.primary:hover { background: #171717; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: progress; }
.link-btn { background: none; border: 0; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 14px; padding: 6px 0; }
.link-btn:hover { color: var(--ink); }

.pic-row { display: flex; align-items: center; gap: 14px; }
.pic-thumb { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; border: 1px solid var(--hairline); background: var(--tint); flex: none; }
.samples { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sample { padding: 0; border: 0; background: none; cursor: pointer; display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-2); text-align: center; }
.sample img { width: 100%; aspect-ratio: 5 / 7; object-fit: cover; border-radius: 8px; box-shadow: 0 0 0 1px var(--hairline); transition: box-shadow .15s; }
.sample:hover img { box-shadow: 0 0 0 1px var(--ink-3); }
.sample[aria-checked="true"] img { box-shadow: 0 0 0 2px var(--ink); }
.sample[aria-checked="true"] { color: var(--ink); font-weight: 600; }

.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--hairline-strong); background: var(--surface); font-size: 14px; font-weight: 500; cursor: pointer; }
.seg button:hover { border-color: var(--ink-3); }
.seg button[aria-checked="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.seg button[hidden] { display: none; }

.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14); outline-offset: 3px; position: relative; }
.swatch[aria-checked="true"] { outline: 2px solid var(--ink); }
.colours { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.colours .swatch { width: 32px; height: 32px; }
.pick-own { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
input[type=color] { width: 40px; height: 32px; padding: 2px; border: 1px solid var(--hairline-strong); border-radius: 8px; background: none; cursor: pointer; }

.range { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.range[hidden] { display: none; }
input[type=range] { width: 100%; accent-color: var(--ink); }
.check { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); }

textarea, input[type=text] { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--hairline-strong); border-radius: 10px; background: var(--surface); font-size: 16px; }
textarea { resize: vertical; line-height: 1.45; }
textarea:focus, input[type=text]:focus { outline: 2px solid var(--ink); outline-offset: -1px; border-color: transparent; }
input::placeholder { color: #a3a3a3; }
.field { display: block; }

.send { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.status { font-size: 13px; color: var(--ink-2); margin-top: 10px; min-height: 1.4em; }
.colours[hidden] { display: none; }
.to-card { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%); min-height: 44px; padding: 0 20px; border-radius: 999px; border: 0; background: var(--ink); color: #fff; font-weight: 600; font-size: 15px; box-shadow: 0 8px 24px rgba(0, 0, 0, .22); cursor: pointer; z-index: 10; }
.to-card[hidden] { display: none; }
