/* The studio. Its own sheet, because it is the page other sites frame and it
   must stay small. Same tokens as site.css, plus a light theme for embedding
   on a light site, and --brand, which a paid key or the embedding page sets. */

@font-face { font-family: "Unbounded"; src: url("/fonts/unbounded-latin.woff2") format("woff2"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/fonts/instrument-sans-latin.woff2") format("woff2"); font-weight: 400 700; font-stretch: 75% 100%; font-display: swap; }

:root {
  --ground: #120c0d;  --ground: oklch(0.165 0.012 15);
  --ground-2: #1c1314; --ground-2: oklch(0.205 0.016 15);
  --ground-3: #261a1c; --ground-3: oklch(0.25 0.02 15);
  --ink: #f5eeee;     --ink: oklch(0.955 0.008 15);
  --ink-2: #a7b1b7;   --ink-2: oklch(0.762 0.013 230);
  --ink-3: #7b8489;   --ink-3: oklch(0.62 0.012 230);
  --line: #ffffff1f;
  --brand: #ba0c2f;
  --lit: #ff3347;     --lit: oklch(0.665 0.236 22);
  --ice: #8fe3ff;     --ice: oklch(0.87 0.105 215);
  --warn: #ffb4a8;
  --display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --body: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  --r: 14px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --ground: #fbf8f7; --ground-2: #ffffff; --ground-3: #f1ecea;
  --ink: #1d1415; --ink-2: #554a4c; --ink-3: #6f6466;
  --line: #1d14151f; --warn: #a3261a; --ice: #0b6f95;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ground); color: var(--ink); -webkit-text-size-adjust: 100%; }
html.embedded, html.embedded body { background: var(--ground); }
body { margin: 0; font: 400 15px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ice); outline-offset: 3px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- the top of the page ---------- */
.top { display: flex; align-items: center; gap: 20px; padding: 16px clamp(16px, 3vw, 40px); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 15px/1 var(--display); }
.ring { width: 28px; height: 28px; fill: none; stroke: var(--lit); stroke-width: 3.2; }
.top nav { margin-left: auto; display: flex; gap: 4px; }
.top nav a { text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: 14px; padding: 9px 12px; border-radius: 99px; }
.top nav a:hover { color: var(--ink); background: #ffffff10; }

.mini { display: flex; align-items: center; gap: 10px; padding: 12px 16px 0; }
.who { margin: 0; display: flex; align-items: center; gap: 8px; font: 700 13px/1 var(--display); }
.who .logo { height: 22px; width: auto; max-width: 120px; object-fit: contain; }
.x { margin-left: auto; width: 36px; height: 36px; border-radius: 99px; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.x svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; }

/* ---------- the studio ---------- */
.studio { display: grid; gap: 28px; padding: 8px clamp(16px, 3vw, 40px) 28px; max-width: 1200px; margin: 0 auto; }
@media (min-width: 980px) {
  .studio { grid-template-columns: minmax(360px, 440px) 1fr; align-items: start; }
  .out:not([hidden]) { position: relative; }
}
html.embedded .studio { grid-template-columns: 1fr; padding: 12px 16px 16px; gap: 20px; }

.title { font: 700 clamp(26px, 3.2vw, 38px)/1.08 var(--display); letter-spacing: -.01em; margin: 6px 0 8px; text-wrap: balance; }
.sub { color: var(--ink-2); margin: 0 0 18px; max-width: 46ch; text-wrap: pretty; }

.steps { display: grid; gap: 16px; }
.step { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 8px; }
.label { display: flex; align-items: center; gap: 8px; margin: 0; padding: 0; font-weight: 600; font-size: 14px; }
.label b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 99px; background: var(--brand); color: #fff; font: 700 11px/1 var(--display); }

.drop { position: relative; display: block; border: 1.5px dashed var(--line); border-radius: var(--r); background: var(--ground-2); cursor: pointer; overflow: hidden; transition: border-color .18s, background-color .18s; }
.drop:hover, .drop.over { border-color: var(--lit); }
.drop .file { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.drop-full .file, .drop:has(.drop-full:not([hidden])) .file { pointer-events: none; }
.drop-empty { display: grid; justify-items: center; gap: 4px; padding: 30px 16px; text-align: center; color: var(--ink-2); }
.drop-empty svg { width: 34px; height: 34px; fill: none; stroke: var(--lit); stroke-width: 1.6; stroke-linejoin: round; margin-bottom: 6px; }
.drop-empty b { color: var(--ink); font-size: 15px; }
.drop-empty span { font-size: 13px; }
.drop-full { position: relative; display: block; }
.photo { width: 100%; max-height: 300px; object-fit: contain; background: #000; cursor: crosshair; position: relative; z-index: 1; }
.focus { position: absolute; z-index: 2; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 99px; border: 2px solid #fff; box-shadow: 0 0 0 2px var(--brand), 0 2px 10px #0008; pointer-events: none; transition: left .2s var(--ease), top .2s var(--ease); }
.hint { margin: 0; color: var(--ink-3); font-size: 13px; }
.hint b { color: var(--ink-2); font-weight: 600; }
.swap { justify-self: start; background: none; border: 0; padding: 2px 0; color: var(--ink-2); font: 600 13px/1.2 var(--body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.line { width: 100%; resize: vertical; min-height: 64px; padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--ground-2); color: var(--ink); font: 400 15px/1.45 var(--body); }
.line:focus { outline: none; border-color: var(--ice); }
.line::placeholder { color: var(--ink-3); }

.chips, .looks { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label, .looks label { position: relative; cursor: pointer; }
.chips input, .looks input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chips span { display: inline-block; padding: 9px 14px; border-radius: 99px; border: 1px solid var(--line); color: var(--ink-2); font-weight: 500; font-size: 14px; transition: background-color .15s, color .15s, border-color .15s; }
.chips input:checked + span { background: var(--brand); border-color: transparent; color: #fff; }
.chips input:focus-visible + span, .looks input:focus-visible ~ .sw { outline: 2px solid var(--ice); outline-offset: 2px; }

.looks label { display: grid; justify-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); width: 74px; }
.sw { display: block; width: 64px; height: 64px; border-radius: 12px; border: 2px solid transparent; background: var(--ground-3); overflow: hidden; position: relative; }
.sw::after { content: ""; position: absolute; inset: 0; }
.sw-shot { background: linear-gradient(135deg, #6e7f86, #3b4246); }
.sw-clean { background: linear-gradient(135deg, #8fb3c4, #34525f); }
.sw-scarlet { background: linear-gradient(135deg, #8fb3c4, #34525f); }
.sw-scarlet::after { top: auto; height: 34%; background: var(--brand); }
.sw-bold { background: linear-gradient(135deg, #6e7f86, #1b1f21); }
.sw-bold::after { background: linear-gradient(transparent 30%, #0a0607cc); }
.looks input:checked ~ .sw { border-color: var(--lit); }
.looks input:checked ~ span:last-child { color: var(--ink); font-weight: 600; }

.go { justify-self: stretch; height: 52px; border: 0; border-radius: 99px; background: var(--brand); color: #fff; font: 700 16px/1 var(--display); letter-spacing: .01em; cursor: pointer; transition: transform .18s var(--ease), filter .18s, opacity .18s; box-shadow: 0 10px 30px -12px var(--brand); }
.go:hover:not(:disabled) { filter: brightness(1.1); }
.go:active:not(:disabled) { transform: scale(.98); }
.go:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.state { margin: 0; min-height: 1.4em; font-size: 14px; color: var(--ink-2); }
.state.warn, .warn { color: var(--warn); }

/* ---------- the posts ---------- */
.out { display: grid; gap: 14px; min-width: 0; }
.out-head h2 { margin: 0; font: 700 22px/1.1 var(--display); }
.writer { margin: 6px 0 0; color: var(--ink-2); font-size: 14px; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
html.embedded .cards { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.card { display: grid; gap: 10px; align-content: start; padding: 12px; border-radius: var(--r); background: var(--ground-2); border: 1px solid var(--line); animation: rise .35s var(--ease) both; }
.card:nth-child(2) { animation-delay: .05s; } .card:nth-child(3) { animation-delay: .1s; } .card:nth-child(4) { animation-delay: .15s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.pname { font-weight: 600; }
.fmt { color: var(--ink-3); font-size: 12px; white-space: nowrap; }
.pic { margin: 0; border-radius: 10px; overflow: hidden; background: #000; }
.pic img { width: 100%; max-height: 380px; object-fit: contain; margin: 0 auto; }
.cap { width: 100%; resize: vertical; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--ground); color: var(--ink); font: 400 14px/1.45 var(--body); }
.cap:focus { outline: none; border-color: var(--ice); }
.meta { margin: 0; display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--ink-3); }
.count.over { color: var(--warn); font-weight: 600; }
.note { color: var(--warn); text-align: right; }
.acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.acts button { height: 40px; border-radius: 99px; border: 1px solid var(--line); background: transparent; color: var(--ink); font: 600 13px/1 var(--body); cursor: pointer; transition: background-color .15s, border-color .15s; }
.acts button:hover { border-color: var(--ink-3); }
.acts .post { grid-column: 1 / -1; height: 44px; background: var(--brand); border-color: transparent; color: #fff; font-size: 14px; }
.acts .post:hover { filter: brightness(1.1); }
.done { margin: 0; min-height: 1.2em; font-size: 13px; color: var(--ice); }

.mark { padding: 4px 16px 14px; text-align: center; font-size: 12px; }
.mark a { color: var(--ink-3); text-decoration: none; }
.mark a:hover { color: var(--ink); }
.foot { display: flex; justify-content: space-between; gap: 16px; padding: 14px clamp(16px, 3vw, 40px) 18px; font-size: 12px; color: var(--ink-3); border-top: 1px solid var(--line); }
.foot nav { display: flex; gap: 16px; }
.foot a { text-decoration: none; }

@media (max-width: 520px) {
  .top nav a:first-child { display: none; }
  .looks label { width: calc(25% - 6px); }
  .sw { width: 100%; height: auto; aspect-ratio: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- the account line, the sheets: sign in, the trade, the limit ---------- */
.acct { margin: 0 0 12px; font-size: 13px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.linkish { background: none; border: 0; padding: 0; color: var(--ink-2); font: 600 13px/1.3 var(--body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linkish:hover { color: var(--ink); }
.sheet { margin: 0 0 18px; padding: 18px; border-radius: var(--r); background: var(--ground-2); border: 1px solid var(--line); box-shadow: 0 0 0 1px color-mix(in oklab, var(--brand) 45%, transparent); }
.sheet-title { margin: 0 0 6px; font: 700 18px/1.2 var(--display); }
.sheet-lead { margin: 0 0 12px; color: var(--ink-2); font-size: 14.5px; }
.sheet p { font-size: 14px; color: var(--ink-2); margin: 0 0 10px; }
.sheet a { color: var(--ice); text-underline-offset: 3px; }
.sheet-state { min-height: 1.2em; color: var(--ice) !important; }
.sheet-state.warn { color: var(--warn) !important; }
.sheet form { display: grid; gap: 10px; margin-bottom: 8px; }
.sheet label { display: grid; gap: 6px; font-size: 13px; color: var(--ink-2); }
.sheet input { height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--ground); color: var(--ink); font: 400 16px/1.2 var(--body); }
.sheet input:focus { outline: none; border-color: var(--ice); }
.go.small { height: 44px; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; padding: 0 18px; }
.keeps { margin: 0 0 12px; padding-left: 18px; font-size: 14px; color: var(--ink-2); display: grid; gap: 6px; }
.keeps b { color: var(--ink); }
.born { margin: 6px 0 12px; max-width: 360px; }
.twin { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.limit { display: grid; gap: 8px; justify-items: start; }
.kept { margin: 0; min-height: 1.2em; font-size: 13px; color: var(--ink-2); }
