:root {
  --wf-bg:        #0f0e0c;
  --wf-surface:   #1a1814;
  --wf-border:    #2e2a24;
  --wf-accent:    #c9a96e;
  --wf-accentDim: #7a6440;
  --wf-text:      #e8e0d0;
  --wf-muted:     #8a8070;
  --wf-glow:      rgba(201, 169, 110, 0.10);
  --wf-error-border: #5a2020;
  --wf-error-text:   #c07070;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--wf-bg);
  color: var(--wf-text);
  font-family: 'Georgia', 'Times New Roman', serif;
  min-height: 100vh;
}

::selection {
  background: rgba(201, 169, 110, 0.3);
  color: var(--wf-text);
}

textarea:focus {
  outline: none;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.6s ease forwards;
}

.pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* Layout */

.wf-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.wf-header {
  width: 100%;
  padding: 52px 24px 36px;
  text-align: center;
  border-bottom: 1px solid var(--wf-border);
  background: radial-gradient(ellipse at top, var(--wf-glow) 0%, transparent 70%);
}

.wf-eyebrow {
  font-size: 11px;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--wf-accent);
  margin-bottom: 18px;
}

.wf-title {
  font-size: clamp(30px, 6vw, 46px);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--wf-text);
  margin-bottom: 14px;
}

.wf-subtitle {
  font-size: 15px;
  color: var(--wf-muted);
  font-style: italic;
  line-height: 1.7;
  max-width: 400px;
  margin: 0 auto;
}

.wf-main {
  width: 100%;
  max-width: 680px;
  padding: 52px 24px 80px;
  flex: 1;
}

.wf-seed-block {
  margin-bottom: 28px;
}

.wf-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--wf-accentDim);
  margin-bottom: 12px;
}

.wf-label--inline {
  display: inline;
  margin-bottom: 0;
}

.wf-textarea {
  width: 100%;
  background: var(--wf-surface);
  border: 1px solid var(--wf-border);
  border-radius: 6px;
  color: var(--wf-text);
  font-size: 16px;
  line-height: 1.75;
  padding: 16px 18px;
  resize: vertical;
  font-family: 'Georgia', serif;
  font-style: italic;
  transition: border-color 0.2s;
}

.wf-textarea:not(:placeholder-shown) {
  font-style: normal;
}

.wf-textarea:focus {
  border-color: var(--wf-accentDim);
}

.wf-textarea--draft {
  font-size: 17px;
  line-height: 1.9;
  padding: 28px;
  margin-bottom: 16px;
  font-style: normal;
}

.wf-buttons {
  display: flex;
  gap: 12px;
  margin-bottom: 52px;
  flex-wrap: wrap;
}

.wf-draft-meta .wf-buttons {
  margin-bottom: 0;
}

.wf-btn {
  padding: 14px 24px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-family: 'Georgia', serif;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, border-color 0.2s, color 0.2s;
}

.wf-btn--primary {
  flex: 1;
  background: linear-gradient(135deg, var(--wf-accent) 0%, #a07840 100%);
  color: #1a1208;
}

.wf-btn--primary:disabled {
  background: var(--wf-surface);
  color: var(--wf-muted);
  cursor: default;
}

.wf-btn--ghost {
  padding: 14px 20px;
  background: transparent;
  border: 1px solid var(--wf-border);
  color: var(--wf-muted);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: none;
}

.wf-btn--outline {
  padding: 11px 22px;
  background: transparent;
  border: 1px solid var(--wf-accentDim);
  color: var(--wf-muted);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: none;
}

.wf-btn--outline.is-copied {
  border-color: var(--wf-accent);
  color: var(--wf-accent);
}

.wf-loading {
  padding: 44px 24px;
  text-align: center;
  color: var(--wf-muted);
  font-style: italic;
  font-size: 15px;
  border: 1px solid var(--wf-border);
  border-radius: 8px;
  background: var(--wf-surface);
}

.wf-loading-icon {
  font-size: 32px;
  margin-bottom: 16px;
}

.wf-draft-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.wf-wordcount {
  font-size: 12px;
  color: var(--wf-muted);
}

.wf-error {
  padding: 20px 24px;
  border: 1px solid var(--wf-error-border);
  border-radius: 8px;
  color: var(--wf-error-text);
  font-size: 14px;
  font-style: italic;
  line-height: 1.6;
}

.wf-footer {
  width: 100%;
  padding: 24px;
  text-align: center;
  border-top: 1px solid var(--wf-border);
  color: var(--wf-muted);
  font-size: 12px;
  letter-spacing: 0.12em;
}
