:root {
  --bg: #fff9ef;
  --bg-2: #ffe6c7;
  --ink: #1d2b24;
  --ink-soft: #415349;
  --brand: #005f73;
  --brand-2: #0a9396;
  --card: #fffdf8;
  --stroke: #eadcc3;
  --shadow: 0 18px 50px rgba(29, 43, 36, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Sora", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(900px 500px at -15% -20%, #ffe1b9 0%, transparent 58%),
    radial-gradient(800px 440px at 115% -15%, #caeee6 0%, transparent 54%),
    var(--bg);
  line-height: 1.6;
}

.container {
  width: min(1160px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  padding: 1rem 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 600;
  border: 1px solid transparent;
  padding: 0.32rem 0.58rem;
  border-radius: 999px;
}

.nav a:hover,
.nav a.active {
  border-color: #d8c7a6;
  color: var(--brand);
}

.hero {
  padding: 0.8rem 0 1rem;
}

.hero h1 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  line-height: 1.1;
}

.hero p {
  margin: 0.55rem 0 0;
  max-width: 70ch;
  color: var(--ink-soft);
}

.layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.card {
  background: color-mix(in oklab, var(--card) 89%, white 11%);
  border: 1px solid var(--stroke);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 1rem;
}

.card h2,
.card h3 {
  margin: 0 0 0.55rem;
}

.field {
  margin-top: 0.72rem;
}

label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
}

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

textarea,
input[type="text"],
input[type="date"],
select {
  width: 100%;
  border: 1px solid var(--stroke);
  background: #fffefa;
  border-radius: 12px;
  padding: 0.62rem 0.7rem;
  color: var(--ink);
}

textarea {
  resize: vertical;
  min-height: 88px;
}

input[type="range"],
input[type="color"] {
  width: 100%;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.inline input[type="checkbox"] {
  width: auto;
}

.small {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.preview-surface {
  background: #fff8ea;
  border: 1px dashed #ccb993;
  min-height: 330px;
  border-radius: 18px;
  padding: 1rem;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  transition: background-color 0.2s ease;
  overflow: hidden;
  position: relative;
}

.preview-main {
  margin: 0;
  line-height: 1.2;
  text-wrap: pretty;
  max-width: 100%;
  word-break: break-word;
}

.preview-sub {
  margin: 0.7rem 0 0;
  color: var(--ink-soft);
  font-size: 1rem;
}

.actions {
  margin-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

button {
  border: 0;
  border-radius: 10px;
  padding: 0.58rem 0.82rem;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: #004e5d;
}

button.ghost {
  background: transparent;
  border: 1px solid var(--stroke);
  color: var(--ink-soft);
}

button.ghost:hover {
  border-color: #c8b489;
  color: var(--ink);
}

.status {
  min-height: 1.3em;
  margin: 0.6rem 0 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.hidden {
  display: none !important;
}

.frame-floral::before,
.frame-classic::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 14px;
  pointer-events: none;
}

.frame-floral::before {
  border: 2px dotted color-mix(in oklab, var(--brand-2) 45%, #b79856 55%);
}

.frame-classic::before {
  border: 2px solid #c7b08a;
}

.shape-circle {
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  width: min(100%, 420px);
  margin-inline: auto;
  min-height: auto;
}

.shape-rounded {
  border-radius: 32px;
}

.gradient-text {
  background: linear-gradient(90deg, #0a9396, #ca6702);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
}

.monogram {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.18em;
}

.monogram.stack {
  flex-direction: column;
  align-items: center;
  gap: 0.03em;
}

.mono-side {
  font-size: 0.72em;
}

.mono-center {
  font-size: 1.2em;
}

.ratio-square {
  aspect-ratio: 1 / 1;
  min-height: auto;
}

.ratio-story {
  aspect-ratio: 9 / 16;
  min-height: auto;
}

.ratio-wide {
  aspect-ratio: 16 / 9;
  min-height: auto;
}

#tattoo-canvas {
  width: 100%;
  max-width: 620px;
  border-radius: 14px;
  border: 1px dashed #c7b087;
  background: #fff8ea;
}

.insta-output {
  margin-top: 0.8rem;
  width: 100%;
  display: grid;
  gap: 0.5rem;
}

.insta-row {
  border: 1px solid var(--stroke);
  border-radius: 10px;
  background: #fffefa;
  padding: 0.52rem;
}

.insta-row p {
  margin: 0;
  font-size: 0.94rem;
  overflow-wrap: anywhere;
}

.insta-row button {
  margin-top: 0.4rem;
  padding: 0.42rem 0.62rem;
  font-size: 0.82rem;
}

.seo {
  margin: 0 0 1.2rem;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 1rem;
}

.seo h2,
.seo h3 {
  font-family: "Fraunces", Georgia, serif;
  margin: 0 0 0.4rem;
}

.seo p {
  margin: 0.4rem 0;
  color: var(--ink-soft);
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.links-grid a {
  color: var(--brand);
  text-decoration: none;
  font-size: 0.93rem;
}

.links-grid a:hover {
  text-decoration: underline;
}

.site-footer {
  padding: 0.4rem 0 1.6rem;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .row {
    grid-template-columns: 1fr;
  }

  .links-grid {
    grid-template-columns: 1fr;
  }
}
