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

:root {
  --bg: #f5f4f0;
  --surface: #ffffff;
  --border: #e0ddd6;
  --accent: #2c6e49;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --radius: 8px;
}

body {
  font-family: 'Georgia', serif;
  background: var(--bg);
  color: var(--text);
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem;
  overflow: hidden;
}

.container {
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

header {
  text-align: center;
  margin-bottom: 1.5rem;
  flex-shrink: 0;
}

header h1 {
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  font-weight: normal;
  letter-spacing: -0.5px;
}

header p {
  color: var(--muted);
  margin-top: 0.4rem;
  font-size: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.card.output-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin-bottom: 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-family: system-ui, sans-serif;
}

.field select {
  font-size: 1rem;
  padding: 0.6rem 2rem 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b6b6b' d='M6 8L0 0h12z'/%3E%3C/svg%3E") no-repeat right 0.65rem center;
  color: var(--text);
  appearance: none;
  outline: none;
  transition: border-color 0.15s;
  font-family: system-ui, sans-serif;
  width: 100%;
  min-height: 44px;
  cursor: pointer;
}

.field select:focus { border-color: var(--accent); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: system-ui, sans-serif;
  cursor: pointer;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  transition: border-color 0.15s, color 0.15s;
  min-height: 44px;
  touch-action: manipulation;
}

.btn:hover,
.btn:active { border-color: var(--accent); color: var(--accent); }

.btn-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
  align-items: center;
  flex-shrink: 0;
}

.output-area {
  flex: 1;
  min-height: 0;
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  font-family: 'Georgia', serif;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  background: transparent;
  padding: 0;
  overflow-y: auto;
}

.output-area::placeholder { color: #c0bdb5; }

.copy-feedback {
  font-size: 0.8rem;
  color: var(--accent);
  font-family: system-ui, sans-serif;
  opacity: 0;
  transition: opacity 0.2s;
}

.copy-feedback.show { opacity: 1; }
