:root {
  --line-green: #06c755;
  --bg: #f7f8fa;
  --card: #ffffff;
  --text: #222;
  --muted: #888;
  --border: #e5e7eb;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
  background: var(--bg);
  color: var(--text);
}
header {
  background: var(--line-green);
  color: #fff;
  padding: 14px 16px;
  font-weight: 700;
  position: sticky;
  top: 0;
  z-index: 10;
}
nav {
  display: flex;
  gap: 4px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 49px;
  z-index: 9;
}
nav a {
  flex: 1;
  text-align: center;
  padding: 12px 0;
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
}
nav a.active { color: var(--line-green); font-weight: 700; border-bottom: 2px solid var(--line-green); }
main { padding: 16px; max-width: 720px; margin: 0 auto; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
}
.card h3 { margin: 0 0 6px; font-size: 16px; }
.card .meta { color: var(--muted); font-size: 12px; }
.card .desc { margin: 8px 0 0; white-space: pre-wrap; font-size: 14px; }
label { display: block; font-size: 13px; margin: 12px 0 4px; color: #555; }
input, textarea {
  width: 100%; padding: 10px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 15px; font-family: inherit;
}
textarea { min-height: 80px; resize: vertical; }
button {
  background: var(--line-green); color: #fff; border: none;
  padding: 12px 16px; border-radius: 8px; font-size: 15px; font-weight: 700;
  cursor: pointer; width: 100%; margin-top: 16px;
}
button.small { width: auto; padding: 6px 10px; font-size: 12px; margin: 0; background: #d33; }
.empty { color: var(--muted); text-align: center; padding: 32px 0; }

/* chat */
.chat-wrap { display: flex; flex-direction: column; height: calc(100vh - 120px); }
.messages { flex: 1; overflow-y: auto; padding: 12px; }
.msg { display: flex; gap: 8px; margin-bottom: 12px; }
.msg.self { flex-direction: row-reverse; }
.msg .avatar { width: 36px; height: 36px; border-radius: 50%; background: #ccc; flex-shrink: 0; object-fit: cover; }
.msg .bubble { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px; max-width: 70%; }
.msg.self .bubble { background: var(--line-green); color: #fff; }
.msg .name { font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.msg .body { white-space: pre-wrap; word-break: break-word; font-size: 14px; }
.composer { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--border); background: var(--card); }
.composer input { flex: 1; }
.composer button { width: auto; margin: 0; padding: 10px 16px; }
