:root {
  color-scheme: light;
  --bg: #f4f1ea;
  --ink: #1d1a16;
  --muted: #5e584e;
  --card: #fffdf9;
  --line: #e3dcd0;
  --accent: #0c6b52;
  --accent-ink: #fff;
  --lock: #8a4b12;
  --free: #0c6b52;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}

a { color: var(--accent); }

.wrap {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
}

header {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.brand {
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}

.maoku {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
}

.maoku:hover { filter: brightness(1.08); }

.hero { padding: 28px 0 8px; }

h1 {
  font-size: 2rem;
  line-height: 1.2;
  margin: 0 0 12px;
}

.lede { font-size: 1.05rem; margin: 0 0 10px; }

.note { color: var(--muted); margin: 0 0 10px; }

.hero-actions { margin: 16px 0 8px; }

.hero-actions a {
  font-weight: 700;
}

.gallery {
  display: grid;
  gap: 16px;
  padding: 8px 0 24px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}

.card h2 {
  font-size: 1.25rem;
  margin: 8px 0;
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
}

.badge-free { background: #e5f6f0; color: var(--free); }
.badge-locked { background: #f8eadb; color: var(--lock); }

.desc { margin: 0 0 8px; }
.source { color: var(--muted); font-size: 0.92rem; margin: 0 0 12px; }

.vars {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

label {
  display: grid;
  gap: 4px;
  font-size: 0.92rem;
  font-weight: 600;
}

input[type="text"] {
  font: inherit;
  font-weight: 400;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  width: 100%;
  background: #fff;
}

.prompt-wrap { position: relative; }

pre.prompt {
  white-space: pre-wrap;
  word-break: break-word;
  background: #f7f4ee;
  border-radius: 8px;
  padding: 12px;
  margin: 0;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.92rem;
  line-height: 1.45;
}

.card.is-locked .prompt-wrap pre,
.card.is-locked .vars {
  filter: blur(6px);
  user-select: none;
  pointer-events: none;
}

.card.is-locked .prompt-wrap::after {
  content: "Unlock to read and copy";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  background: rgba(255, 253, 249, 0.45);
  border-radius: 8px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  margin-top: 12px;
}

button {
  font: inherit;
  font-weight: 700;
  background: var(--ink);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

button.secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}

.try { margin: 0; font-size: 0.95rem; }
.try a { margin-right: 12px; }

.unlock {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  margin: 8px 0 24px;
}

.unlock h2 { margin: 0 0 8px; }

#paypal-container-2KGP4DZ8AAWCY {
  min-height: 52px;
  max-width: 320px;
  margin: 12px 0;
}

#unlock-status { color: var(--muted); }

.unlock form {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.unlock-code {
  font-family: Consolas, "Courier New", monospace;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 12px 0 4px;
}

.sources { color: var(--muted); font-size: 0.95rem; padding-bottom: 28px; }
.sources ul { padding-left: 18px; }

footer {
  border-top: 1px solid var(--line);
  padding: 16px 0 28px;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 640px) {
  h1 { font-size: 1.6rem; }
  .bar { align-items: flex-start; flex-direction: column; }
}
