/* Tattoo from Photo — studio shell and tool surfaces.
   Extends the incumbent warm paper / ink / clay identity. */

:root {
  --paper: #faf5ec;
  --paper-2: #f2e7d7;
  --paper-3: #fffdf8;
  --ink: #241c16;
  --ink-2: #4a3c30;
  --muted: #6b5a4a;
  --clay: #a94a24;
  --clay-dark: #843717;
  --line: #e0d1bd;
  --ok: #3f6212;
  --error: #a12c1f;
  --display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --body: "Avenir Next", "Segoe UI", Roboto, system-ui, -apple-system, sans-serif;
  --radius: 14px;
  --shadow: 0 14px 34px -30px rgba(74, 44, 24, .55);
  --wrap: 1120px;
  --text: 720px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.62 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: #e7c9a9; color: var(--ink); }
:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; }
img, svg, canvas { max-width: 100%; }
img { height: auto; }
a { color: var(--clay-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--clay); }
h1, h2, h3 { margin: 0 0 .45em; font-family: var(--display); font-weight: 600; line-height: 1.12; letter-spacing: -.025em; text-wrap: balance; }
h1 { font-size: clamp(2.35rem, 5.3vw, 3.75rem); letter-spacing: -.03em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.25rem); }
h3 { font-size: 1.28rem; letter-spacing: -.018em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
li { margin: .35em 0; }
strong, b { font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

.wrap { width: min(var(--wrap), 100% - 48px); margin-inline: auto; }
.text { max-width: var(--text); }
.lede { font: 400 1.18rem/1.55 var(--display); color: var(--ink-2); max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.stack > * + * { margin-top: 1rem; }

/* Header */
.site-head {
  position: sticky; top: 0; z-index: 40;
  background: rgba(250, 245, 236, .96);
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(8px)) { .site-head { backdrop-filter: blur(8px); } }
.head-in { display: flex; align-items: center; gap: 1rem; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--ink); text-decoration: none; font: 600 1.22rem var(--display); letter-spacing: -.02em; white-space: nowrap; }
.brand svg { width: 28px; height: 28px; flex: none; }
.nav { display: flex; gap: .15rem; margin-left: auto; align-items: center; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: .92rem; padding: .55rem .62rem; border-radius: 8px; }
.nav a:hover { background: var(--paper-2); color: var(--ink); }
.head-cta { margin-left: .4rem; }

.mobile-menu { display: none; margin-left: auto; position: relative; }
.mobile-menu > summary { list-style: none; cursor: pointer; border: 1px solid var(--line); background: var(--paper-3); color: var(--ink); border-radius: 9px; padding: .55rem .8rem; font: 600 .9rem var(--body); }
.mobile-menu > summary::-webkit-details-marker { display: none; }
.mobile-menu[open] > summary { border-color: var(--clay); }
.mobile-menu nav { position: absolute; right: 0; top: calc(100% + .5rem); min-width: 220px; background: var(--paper-3); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: .5rem; display: grid; }
.mobile-menu nav a { padding: .65rem .7rem; border-radius: 8px; }

/* Buttons and links */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 46px; padding: .7rem 1.15rem; border-radius: 9px;
  border: 1px solid transparent; background: var(--clay); color: #fff;
  font: 600 .96rem var(--body); line-height: 1.1; text-decoration: none; cursor: pointer;
  transition: background .14s ease, border-color .14s ease, color .14s ease, transform .14s ease;
}
.btn:hover { background: var(--clay-dark); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn.ghost { background: var(--paper-3); color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--clay); color: var(--clay-dark); background: var(--paper-3); }
.btn.small { min-height: 38px; padding: .5rem .8rem; font-size: .875rem; }
.btn.block { width: 100%; }
.textlink { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; text-decoration: none; border-bottom: 1px solid #c9a986; }
.textlink:hover { border-color: var(--clay); }

/* Hero */
.hero { padding: clamp(2.4rem, 5vw, 4.2rem) 0 1.6rem; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(1.6rem, 4vw, 3.4rem); align-items: center; }
.hero h1 { max-width: 15ch; margin-bottom: .35em; }
.hero .lede { margin-bottom: 1.3rem; }
.hero-note { display: flex; flex-wrap: wrap; gap: .5rem 1.1rem; font-size: .84rem; color: var(--muted); margin-top: .9rem; }
.hero-note span { display: inline-flex; align-items: center; gap: .35rem; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--clay); display: inline-block; }

.upload-card { background: var(--paper-3); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.15rem; box-shadow: var(--shadow); }
.upload-card h2 { font-size: 1.15rem; margin-bottom: .3rem; }
.upload-card p { font-size: .92rem; color: var(--muted); margin-bottom: .8rem; }
.dropzone {
  display: flex; align-items: center; gap: .85rem; width: 100%;
  border: 2px dashed #cfb28f; border-radius: 12px; background: #fffaf2;
  padding: 1rem; min-height: 86px; cursor: pointer; text-align: left; color: var(--ink);
  font: inherit; transition: border-color .14s ease, background .14s ease;
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--clay); background: #fff6e9; }
.dropzone[data-dragging="true"] { border-color: var(--clay); background: #ffefdc; }
.dropzone .drop-ico { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); color: var(--clay); }
.dropzone b { display: block; font-size: .98rem; }
.dropzone small { display: block; color: var(--muted); font-size: .82rem; line-height: 1.4; }
.dropzone.has-file { border-style: solid; border-color: var(--line); background: var(--paper-3); }
.samples { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin-top: .8rem; }
.samples span { font-size: .82rem; color: var(--muted); }
.chip {
  border: 1px solid var(--line); background: var(--paper-3); color: var(--ink);
  border-radius: 999px; min-height: 36px; padding: .35rem .8rem; font: 500 .84rem var(--body); cursor: pointer;
}
.chip:hover, .chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.hero-figure { margin: 0; }
.hero-figure .photo-pair { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #fff; }
.hero-figure figcaption { font-size: .8rem; color: var(--muted); margin-top: .55rem; }

/* Before / after */
.ba { position: relative; aspect-ratio: 1 / 1; overflow: hidden; --p: 50%; background: var(--paper-2); touch-action: pan-y; }
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba .after { clip-path: inset(0 0 0 var(--p)); }
.ba::after { content: ""; position: absolute; top: 0; bottom: 0; left: var(--p); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.25); pointer-events: none; }
.ba input[type="range"] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.ba .tag { position: absolute; bottom: .6rem; z-index: 2; background: rgba(20,14,10,.82); color: #fff; font: 600 .68rem/1 var(--body); letter-spacing: .06em; text-transform: uppercase; padding: .35rem .5rem; border-radius: 4px; pointer-events: none; }
.ba .tag.l { left: .6rem; }
.ba .tag.r { right: .6rem; }
.ba.wide { aspect-ratio: 16 / 10; }

/* Sections */
.section { padding: clamp(2.6rem, 6vw, 4.6rem) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: 1.7rem; }
.section-head h2 { margin-bottom: .3rem; }
.section-head p { color: var(--muted); margin: 0; }
.ink { background: var(--ink); color: #f3e9dc; }
.ink h2, .ink h3, .ink strong { color: #fff; }
.ink p, .ink li { color: #d8c8b6; }
.ink a { color: #f0b38c; }
.ink .textlink { border-color: #7a5b45; }

/* Tool index — editorial rows, not a card grid */
.tool-list { border-top: 1px solid var(--line); }
.tool-row { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 1.5rem; padding: 1.7rem 0; border-bottom: 1px solid var(--line); align-items: start; }
.tool-row h3 { margin-bottom: .35rem; font-size: 1.55rem; }
.tool-row p { color: var(--ink-2); margin-bottom: .7rem; max-width: 52ch; }
.tool-row .meta { font-size: .82rem; color: var(--muted); }
.tool-row .tool-link { grid-column: 2; justify-self: start; }
.tool-row:nth-child(even) .tool-link { justify-self: end; }
@media (max-width: 760px) { .tool-row { grid-template-columns: 1fr; gap: .4rem; } .tool-row .tool-link { grid-column: 1; justify-self: start; } }

/* Steps */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; border-top: 1px solid var(--line); padding-top: 1.2rem; }
.steps li { list-style: none; margin: 0; position: relative; padding-top: 2.1rem; font-size: .93rem; color: var(--ink-2); }
.steps li::before { counter-increment: step; content: counter(step); position: absolute; top: 0; left: 0; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--clay); color: #fff; font: 600 .78rem var(--display); }
.steps li b { display: block; color: var(--ink); font-size: .98rem; margin-bottom: .2rem; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } .steps li { padding-left: 2.2rem; } .steps li::before { top: .1rem; } }

/* Design ideas / styles */
.idea-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.idea { display: block; padding: 1.2rem 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-3); text-decoration: none; color: var(--ink); transition: border-color .14s ease, transform .14s ease; }
.idea:hover { border-color: var(--clay); transform: translateY(-2px); color: var(--ink); }
.idea b { display: block; font: 600 1.12rem var(--display); margin-bottom: .25rem; }
.idea span { display: block; color: var(--muted); font-size: .9rem; }
@media (max-width: 700px) { .idea-grid { grid-template-columns: 1fr; } }

/* Examples */
.examples { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.example { margin: 0; }
.example .ba { border-radius: 12px; border: 1px solid var(--line); }
.example figcaption { font-size: .84rem; color: var(--muted); margin-top: .5rem; }
@media (max-width: 860px) { .examples { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .examples { grid-template-columns: 1fr; } }

/* Tool page shell */
.tool-page { padding: clamp(1.6rem, 3.6vw, 2.8rem) 0 0; }
.tool-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); gap: 2rem; align-items: end; margin-bottom: 1.3rem; }
.tool-intro h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); margin-bottom: .25em; }
.tool-intro .lede { font-size: 1.06rem; margin: 0; }
.tool-intro .intro-aside { border-left: 1px solid var(--line); padding-left: 1.3rem; color: var(--muted); font-size: .9rem; }
@media (max-width: 760px) { .tool-intro { grid-template-columns: 1fr; gap: .8rem; } .tool-intro .intro-aside { border-left: 0; border-top: 1px solid var(--line); padding: .8rem 0 0; } }

.studio { background: var(--paper-3); border: 1px solid var(--line); border-radius: 16px; padding: clamp(1rem, 2.6vw, 1.5rem); box-shadow: var(--shadow); }
.studio-step { display: flex; align-items: baseline; gap: .65rem; margin: 1.35rem 0 .7rem; }
.studio-step:first-child { margin-top: 0; }
.studio-step b { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--clay); color: #fff; font: 600 .78rem var(--display); }
.studio-step h2 { font-size: 1.14rem; margin: 0; letter-spacing: -.01em; }
.studio-row { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 1rem; align-items: stretch; }
@media (max-width: 760px) { .studio-row { grid-template-columns: 1fr; } }

.studio .dropzone { min-height: 108px; }
.studio .samples-panel { background: var(--paper-2); border-radius: 12px; padding: 1rem; display: flex; flex-direction: column; justify-content: center; }
.studio .samples-panel p { margin: 0 0 .55rem; font-size: .86rem; color: var(--muted); }

.style-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; }
.st-card { display: block; text-align: left; padding: .5rem; border: 2px solid transparent; border-radius: 12px; background: var(--paper-3); color: var(--ink); cursor: pointer; font: inherit; box-shadow: 0 1px 0 var(--line); transition: border-color .14s ease, transform .14s ease, box-shadow .14s ease; }
.st-card:hover { transform: translateY(-2px); box-shadow: 0 1px 0 var(--line), 0 14px 26px -24px rgba(74, 44, 24, .6); }
.st-card[aria-pressed="true"] { border-color: var(--clay); box-shadow: 0 0 0 1px var(--clay); }
.st-art { aspect-ratio: 1 / 1; border-radius: 8px; overflow: hidden; background: var(--paper-2); display: grid; place-items: center; }
.st-art canvas, .st-art img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.st-card b { display: block; font: 600 1rem var(--display); margin: .5rem .2rem .1rem; }
.st-card small { display: block; color: var(--muted); font-size: .78rem; margin: 0 .2rem .2rem; line-height: 1.35; }
@media (max-width: 860px) { .style-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.studio-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem 1rem; margin-top: .9rem; }
.studio-actions .hint { color: var(--muted); font-size: .86rem; max-width: 44ch; margin: 0; }

.try-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 1.1rem; align-items: start; }
.try-canvas-wrap { background: var(--paper-2); border-radius: 12px; padding: .5rem; }
#tryCv { display: block; width: 100%; height: auto; border-radius: 8px; background: #f6efe6; }
#tryInfo { margin: .5rem .1rem 0; text-align: center; color: var(--muted); font-size: .82rem; }
.try-controls h3 { font-size: 1rem; margin: 0 0 .5rem; }
.try-controls label { display: block; margin: .7rem 0 .25rem; font-size: .82rem; color: var(--muted); }
.try-controls input[type="range"] { width: 100%; accent-color: var(--clay); }
.try-controls input[type="text"] { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: .55rem .65rem; font: 500 .95rem var(--display); background: var(--paper); color: var(--ink); }
.zone-row, .tone-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.zone-row .chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.tone { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.tone[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--clay); }
@media (max-width: 760px) { .try-grid { grid-template-columns: 1fr; } }

.export-row { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.1rem; }
.status { min-height: 1.6rem; margin: .8rem 0 0; font-size: .92rem; }
.status a { font-weight: 600; }
.bal { margin: .3rem 0 0; color: var(--ok); font-size: .88rem; font-weight: 600; }
.code-link { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: 400 .82rem var(--body); padding: .35rem 0; min-height: 32px; }
.token-row { display: flex; gap: .5rem; margin-top: .35rem; }
.token-row[hidden] { display: none; }
.token-row input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: .55rem .65rem; font-size: .95rem; background: var(--paper); color: var(--ink); }

/* Pricing strip */
.price-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; margin-top: 1rem; }
.price { border: 1px solid var(--line); border-radius: 12px; background: var(--paper); padding: 1rem; }
.price.feature { border-color: var(--clay); background: #fff8f1; }
.price h3 { font-size: 1rem; margin: 0 0 .1rem; }
.price .amount { font: 600 1.8rem var(--display); margin: .1rem 0 .2rem; }
.price p { font-size: .82rem; color: var(--muted); margin: 0 0 .7rem; min-height: 2.6em; }
@media (max-width: 700px) { .price-row { grid-template-columns: 1fr; } }

/* FAQ */
.faq { max-width: 820px; }
.faq details { background: var(--paper-3); border: 1px solid var(--line); border-radius: 10px; padding: .9rem 1rem; margin: 0 0 .55rem; }
.faq summary { cursor: pointer; font: 600 1.02rem var(--display); }
.faq summary::marker { color: var(--clay); }
.faq p { margin: .6rem 0 0; color: var(--ink-2); }

/* Read surfaces */
.prose { max-width: 760px; }
.prose h2 { margin-top: 2.2em; }
.prose h3 { margin-top: 1.6em; }
.prose p, .prose li { color: var(--ink-2); }
.prose table { width: 100%; border-collapse: collapse; margin: 1.3rem 0; font-size: .92rem; background: var(--paper-3); border: 1px solid var(--line); }
.prose th, .prose td { text-align: left; padding: .65rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--paper-2); font: 600 .82rem var(--body); letter-spacing: .02em; }
.prose blockquote { margin: 1.4rem 0; padding: .9rem 1.1rem; background: var(--paper-2); border-radius: 10px; color: var(--ink); }
.prose .callout { margin: 1.4rem 0; padding: 1rem 1.15rem; background: var(--paper-3); border: 1px solid var(--line); border-radius: 12px; }
.trail { font-size: .8rem; color: var(--muted); margin-bottom: .7rem; }
.trail a { color: var(--muted); text-decoration: none; }
.trail a:hover { color: var(--clay-dark); text-decoration: underline; }
.byline { font-size: .82rem; color: var(--muted); margin-bottom: 1.5rem; }

/* For artists / CTA band */
.artist-band { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2rem; align-items: center; background: var(--ink); color: #f3e9dc; border-radius: 18px; padding: clamp(1.6rem, 4vw, 2.6rem); }
.artist-band h2 { color: #fff; }
.artist-band p { color: #d8c8b6; }
.artist-band ul { color: #d8c8b6; }
.artist-band .btn { background: #f3e9dc; color: var(--ink); }
.artist-band .btn:hover { background: #fff; color: var(--ink); }
@media (max-width: 760px) { .artist-band { grid-template-columns: 1fr; } }

.cta-band { text-align: center; padding: clamp(2.4rem, 5vw, 3.8rem) 1rem; background: var(--paper-2); border-radius: 18px; }
.cta-band h2 { margin-bottom: .3rem; }
.cta-band p { color: var(--ink-2); max-width: 52ch; margin: 0 auto 1.2rem; }

/* Footer */
.site-foot { margin-top: clamp(3rem, 7vw, 5rem); background: #efe3d1; border-top: 1px solid var(--line); padding: 2.6rem 0 1.6rem; }
.foot-grid { display: grid; grid-template-columns: 1.2fr repeat(5, minmax(0, 1fr)); gap: 1.4rem; }
.foot-brand p { color: var(--muted); font-size: .9rem; max-width: 32ch; }
.foot-col h3 { font: 600 .78rem var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-bottom: .55rem; }
.foot-col a { display: block; color: var(--muted); text-decoration: none; font-size: .9rem; padding: .22rem 0; }
.foot-col a:hover { color: var(--clay-dark); text-decoration: underline; }
.foot-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; margin-top: 1.8rem; padding-top: 1.1rem; border-top: 1px solid #ddc9b1; color: var(--muted); font-size: .78rem; }
.foot-legal p { margin: 0; }
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }

/* Utility + motion */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--ink); color: #fff; padding: .7rem 1rem; border-radius: 0 0 8px 0; }
.skip:focus { left: 0; }
[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero h1 { max-width: 18ch; }
  .nav { display: none; }
  .head-cta { display: none; }
  .mobile-menu { display: block; }
}
@media (max-width: 620px) {
  .wrap { width: min(var(--wrap), 100% - 32px); }
  .head-in { min-height: 60px; }
  .brand { font-size: 1.08rem; }
  .hero { padding-top: 1.8rem; }
  .upload-card { padding: .9rem; }
  .studio { padding: .85rem; border-radius: 12px; }
  .studio-row { gap: .7rem; }
  .studio-actions .btn { flex: 1 1 100%; }
  .export-row .btn { flex: 1 1 100%; }
  .price-row { gap: .55rem; }
}

/* SVG trace preview */
.svg-preview { margin-top: .9rem; border: 1px solid var(--line); border-radius: 12px; background: var(--paper-2); padding: .6rem; max-height: 420px; overflow: auto; }
.svg-preview svg { display: block; width: 100%; height: auto; max-height: 380px; background: #fff; }

.styles-empty { margin: 0; padding: .85rem 1rem; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: .9rem; background: var(--paper); }
#styles[hidden] { display: none; }

#previewWrap[hidden] { display: none; }

.st-art .loading { font-size: .72rem; color: var(--muted); }
#styles[aria-busy="true"] .st-card { opacity: .85; }

/* GIF maker */
.gif-panel { margin-top: 1.6rem; border-top: 1px solid var(--line); padding-top: 1.2rem; }
.gif-controls { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; margin: .9rem 0; }
.gif-controls label { display: block; margin: 0 0 .25rem; font-size: .8rem; color: var(--muted); }
.gif-controls select { width: 100%; min-height: 42px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); padding: .45rem .6rem; font: 500 .92rem var(--body); }
.gif-preview { margin-top: 1rem; border: 1px solid var(--line); border-radius: 12px; padding: .6rem; background: var(--paper-2); max-width: 480px; }
.gif-preview img { display: block; width: 100%; height: auto; border-radius: 8px; background: #fff; }
@media (max-width: 700px) { .gif-controls { grid-template-columns: 1fr 1fr; } }

.ba:focus-within { outline: 2px solid var(--clay); outline-offset: 3px; }

.price-row.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 980px) { .price-row.four { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .price-row.four { grid-template-columns: 1fr; } }

.noscript { margin: 1rem 0; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 10px; background: var(--paper-2); color: var(--ink-2); font-size: .9rem; }

.foot-langs { max-width: 1180px; margin: 0 auto 1rem; padding: 0 1.2rem; color: var(--ink-2); font-size: .85rem; }
.foot-langs a { margin-right: .35rem; }

.table-wrap { overflow-x: auto; margin: 1rem 0; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: .92rem; background: var(--paper-3); border: 1px solid var(--line); }
.table-wrap th, .table-wrap td { padding: .6rem .7rem; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
.table-wrap th { font-weight: 600; background: var(--paper-2); }
