:root {
  --paper: #f4efe6;
  --ink: #252118;
  --muted: #756d5d;
  --line: #d9ceb8;
  --panel: #fffaf0;
  --accent: #7b5f36;
  --accent-2: #304c3a;
  --danger: #8a3f32;
  --shadow: 0 24px 80px rgba(50, 39, 22, 0.14);
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  font-family: ui-serif, "Iowan Old Style", "Songti SC", "Noto Serif CJK SC", Georgia, serif;
  background:
    radial-gradient(circle at 15% 15%, rgba(123, 95, 54, 0.12), transparent 28rem),
    radial-gradient(circle at 80% 10%, rgba(48, 76, 58, 0.10), transparent 24rem),
    linear-gradient(135deg, #f7f1e7 0%, var(--paper) 45%, #ebe1cf 100%);
  color: var(--ink);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.45;
  background-image:
    linear-gradient(rgba(37, 33, 24, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 33, 24, 0.025) 1px, transparent 1px);
  background-size: 34px 34px;
}

button, input, textarea { font: inherit; }

.shell {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0;
}

.hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 26px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(3.5rem, 9vw, 7.5rem);
  line-height: 0.86;
  font-weight: 520;
  letter-spacing: -0.08em;
}

.sub {
  max-width: 620px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.8;
}

.stamp {
  width: 134px;
  height: 134px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(123, 95, 54, 0.45);
  border-radius: 50%;
  color: rgba(123, 95, 54, 0.8);
  text-align: center;
  line-height: 1.15;
  transform: rotate(-8deg);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
}

.panel {
  position: relative;
  background: rgba(255, 250, 240, 0.86);
  border: 1px solid rgba(217, 206, 184, 0.9);
  border-radius: 34px;
  box-shadow: var(--shadow);
  padding: clamp(20px, 4vw, 36px);
  backdrop-filter: blur(12px);
}

.panel::after {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px dashed rgba(123, 95, 54, 0.22);
  border-radius: 24px;
  pointer-events: none;
}

.grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
}

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

label { display: grid; gap: 8px; }

label span {
  color: var(--muted);
  font-size: 0.95rem;
}

input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.54);
  color: var(--ink);
  border-radius: 18px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

input {
  min-height: 54px;
  padding: 0 18px;
}

textarea {
  min-height: 340px;
  margin-top: 18px;
  padding: 20px;
  resize: vertical;
  line-height: 1.7;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

input:focus, textarea:focus {
  border-color: rgba(123, 95, 54, 0.78);
  box-shadow: 0 0 0 5px rgba(123, 95, 54, 0.12);
  background: rgba(255, 255, 255, 0.76);
}

.toolbar {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

button {
  border: 1px solid rgba(37, 33, 24, 0.12);
  background: #f7f0e4;
  color: var(--ink);
  padding: 13px 18px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(50, 39, 22, 0.08);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(50, 39, 22, 0.13);
}

button:active { transform: translateY(0); }

button.primary {
  color: #fff9ed;
  background: var(--accent-2);
}

button.danger {
  color: #fff9ed;
  background: var(--danger);
}

.meta {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

.notes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.notes article {
  border: 1px solid rgba(217, 206, 184, 0.85);
  border-radius: 24px;
  background: rgba(255, 250, 240, 0.55);
  padding: 20px;
}

.notes h2 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.notes p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 760px) {
  .shell { width: min(100% - 22px, 1040px); padding: 28px 0; }
  .hero { display: block; }
  .stamp { display: none; }
  .two, .notes { grid-template-columns: 1fr; }
  textarea { min-height: 280px; }
  .toolbar button { flex: 1 1 auto; }
}
