:root {
  --bg: #fafaf8;
  --fg: #1c1c1a;
  --muted: #8a8a82;
  --border: #e4e4de;
  --accent: #1c1c1a;
  --approve: #2f7d4f;
  --reject: #b3402f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--fg);
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  border-bottom: 1px solid var(--border);
}

.brand { font-weight: 700; letter-spacing: -0.02em; }

nav a {
  margin-left: 20px;
  color: var(--fg);
  text-decoration: none;
  font-size: 14px;
}
nav a:hover { text-decoration: underline; }
.logout-form {
  display: inline-block;
  margin-left: 20px;
}
.logout-form button.link {
  font-size: 14px;
  text-decoration: none;
  color: var(--fg);
}
.logout-form button.link:hover { text-decoration: underline; }

main {
  max-width: 820px;
  margin: 0 auto;
  padding: 24px 32px 80px;
}

h1 { font-size: 22px; margin-bottom: 16px; }
h2 { font-size: 16px; margin: 28px 0 10px; }

.muted { color: var(--muted); font-weight: 400; font-size: 13px; }

.add-idea {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.add-idea textarea {
  min-height: 44px;
}
.add-idea-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

textarea, input[type=text], input[type=date], input[type=time], select {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  resize: vertical;
  background: #fff;
}
select { width: auto; padding: 6px 10px; }

.schedule-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.inline-field {
  display: flex;
  align-items: center;
  gap: 6px;
}
.inline-field input[type=text],
.inline-field input[type=date],
.inline-field input[type=time] {
  width: auto;
  padding: 6px 10px;
}
.inline-field label { font-size: 12px; }

button {
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
button.secondary { background: #efefe9; color: var(--fg); }
button.approve { background: var(--approve); color: #fff; }
button.reject { background: #fff; color: var(--reject); border: 1px solid var(--reject); }
button.link { background: none; color: var(--muted); text-decoration: underline; padding: 0; }

.inline-form { margin-top: 12px; margin-bottom: 20px; }

.draft-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
  background: #fff;
}
.draft-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
  font-size: 12px;
  flex-wrap: wrap;
}
.badge {
  background: #efefe9;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
}
.scores { color: var(--muted); }
.draft-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.readonly-content {
  padding: 10px;
  background: #f5f5f0;
  border-radius: 8px;
  white-space: pre-wrap;
  font-size: 14px;
}

.prompt-editor {
  min-height: 420px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}
.taste-things-editor { min-height: 140px; }
.taste-topic-prompt-editor { min-height: 220px; }

.calendar-actions { margin-top: 8px; }

.ai-tells-disclosure {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 24px;
  background: #f5f5f0;
  font-size: 13px;
}
.ai-tells-disclosure summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}
.ai-tells-disclosure ul {
  margin: 4px 0 12px;
  padding-left: 20px;
}
.ai-tells-disclosure li { margin-bottom: 4px; }

.emoji-popover {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-top: 8px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  max-width: 360px;
}
.emoji-popover[hidden] { display: none; }
.emoji-btn {
  background: none;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 18px;
  line-height: 1;
  padding: 5px 6px;
  cursor: pointer;
}
.emoji-btn:hover { background: #efefe9; }

.table-scroll { overflow-x: auto; }
.summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-top: 8px;
}
.summary-table th, .summary-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.summary-table th { font-size: 12px; color: var(--muted); font-weight: 600; }
.summary-table td:last-child { min-width: 220px; }

.login-main {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-box {
  width: 100%;
  max-width: 320px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  background: #fff;
}
.login-box .brand { text-align: center; margin-bottom: 20px; font-size: 18px; }
.login-box form { display: flex; flex-direction: column; gap: 4px; }
.login-box label { margin-top: 10px; font-size: 12px; }
.login-box button { margin-top: 18px; }
.login-error {
  color: var(--reject);
  font-size: 13px;
  text-align: center;
  margin: 0 0 8px;
}
