:root {
  color-scheme: light;
  --ink: #1c1915;
  --muted: #5e574e;
  --line: #e3d9cc;
  --paper: #f6f1e8;
  --card: #fffdf9;
  --accent: #0f6e56;
  --accent-ink: #f4fff9;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.5 "Avenir Next", "Segoe UI", sans-serif;
}

main {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 64px;
}

header { max-width: 38rem; margin-bottom: 28px; }

h1 {
  margin: 0 0 8px;
  font-family: Palatino, "Iowan Old Style", "Palatino Linotype", serif;
  font-size: 2.6rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

p { margin: 0; color: var(--muted); }

.layout {
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
  gap: 20px;
  align-items: start;
}

form, .preview {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
}

label {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 0.86rem;
  color: var(--muted);
}

input, select, button {
  font: inherit;
  color: var(--ink);
}

input, select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
}

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

button {
  width: 100%;
  margin-top: 4px;
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
}

.url {
  margin: 0 0 14px;
  padding: 12px;
  border-radius: 12px;
  background: #f3eee6;
  overflow-wrap: anywhere;
  font-family: "SFMono-Regular", ui-monospace, monospace;
  font-size: 0.82rem;
}

.url a { color: var(--ink); }

.status { min-height: 1.5em; color: var(--muted); }

img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  background:
    linear-gradient(45deg, #efe8dc 25%, transparent 25%),
    linear-gradient(-45deg, #efe8dc 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #efe8dc 75%),
    linear-gradient(-45deg, transparent 75%, #efe8dc 75%);
  background-size: 24px 24px;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
}

img[hidden] { display: none; }

@media (max-width: 800px) {
  .layout { grid-template-columns: 1fr; }
  h1 { font-size: 2.2rem; }
}
