.tsuyomi-wrap { max-width: 880px; margin: 0 auto; padding: 16px; box-sizing: border-box; }
.tsuyomi-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 18px; margin: 0 0 18px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.tsuyomi-card h2, .tsuyomi-card h3 { margin-top: 0; line-height: 1.35; }
.tsuyomi-muted, .tsuyomi-help { color: #666; font-size: .92em; }
.tsuyomi-help { margin: 6px 0 16px; }
.tsuyomi-required { color: #b42318; font-size: .85em; }
.tsuyomi-optional { color: #666; font-size: .85em; }
.tsuyomi-form label { display: block; font-weight: 700; margin: 18px 0 6px; }
.tsuyomi-form input[type="text"], .tsuyomi-form textarea, .tsuyomi-form select { width: 100%; box-sizing: border-box; padding: 12px; border: 1px solid #d0d5dd; border-radius: 10px; font-size: 16px; line-height: 1.5; background: #fff; }
.tsuyomi-form textarea { resize: vertical; }
.tsuyomi-fieldset, .tsuyomi-scale-fieldset { border: 1px solid #e5e7eb; border-radius: 12px; padding: 14px; margin: 18px 0; }
.tsuyomi-fieldset legend, .tsuyomi-scale-fieldset legend { font-weight: 700; padding: 0 6px; }
.tsuyomi-radio { display: inline-flex !important; align-items: center; gap: 6px; margin: 8px 16px 8px 0 !important; font-weight: 400 !important; }
.tsuyomi-scale-fieldset label { display: inline-flex; align-items: center; gap: 4px; margin: 8px 12px 4px 0; font-weight: 400; }
.tsuyomi-button, .tsuyomi-form button.tsuyomi-button { display: inline-block; background: #111827; color: #fff !important; text-decoration: none; border: 1px solid #111827; border-radius: 999px; padding: 10px 18px; font-weight: 700; cursor: pointer; line-height: 1.2; }
.tsuyomi-button:hover { opacity: .88; }
.tsuyomi-button-secondary { background: #fff; color: #111827 !important; border-color: #d0d5dd; }
.tsuyomi-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 18px; }
.tsuyomi-notice { background: #ecfdf3; border: 1px solid #abefc6; border-radius: 12px; padding: 14px; margin: 0 0 18px; }
.tsuyomi-error { background: #fef3f2; border-color: #fecdca; }
.tsuyomi-prompt-box { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 12px; padding: 14px; margin: 16px 0; }
.tsuyomi-privacy-note { font-size: .92em; color: #555; background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 12px; }
.tsuyomi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tsuyomi-stat { text-align: center; }
.tsuyomi-stat strong { display: block; font-size: 2rem; }
.tsuyomi-stat span { color: #666; }
.tsuyomi-log-item { border-top: 1px solid #e5e7eb; padding: 16px 0; }
.tsuyomi-log-item:first-of-type { border-top: none; }
.tsuyomi-log-date { color: #666; font-size: .9em; }
.tsuyomi-log-dl { display: grid; grid-template-columns: 180px 1fr; gap: 8px 12px; }
.tsuyomi-log-dl dt { font-weight: 700; color: #333; }
.tsuyomi-log-dl dd { margin: 0; }
.tsuyomi-mini-log { border-top: 1px solid #eee; padding: 10px 0; }
.tsuyomi-mini-log strong { display: block; }
.tsuyomi-mini-log span { color: #666; font-size: .9em; }
.tsuyomi-link-button { background: none; border: none; color: #667085; text-decoration: underline; cursor: pointer; padding: 0; }
.tsuyomi-floating-button { position: fixed; right: 18px; bottom: 18px; z-index: 9999; display: none; background: #111827; color: #fff !important; text-decoration: none; border-radius: 999px; padding: 12px 16px; font-weight: 700; box-shadow: 0 8px 18px rgba(0,0,0,.18); }
@media (max-width: 680px) {
  .tsuyomi-wrap { padding: 10px; }
  .tsuyomi-card { padding: 15px; border-radius: 12px; }
  .tsuyomi-grid { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .tsuyomi-log-dl { grid-template-columns: 1fr; }
  .tsuyomi-log-dl dt { margin-top: 8px; }
  .tsuyomi-actions { flex-direction: column; align-items: stretch; }
  .tsuyomi-button { text-align: center; }
  .tsuyomi-floating-button { display: inline-block; }
}

/* v0.2.4.6: 迷子防止UX・継続入力導線 */
.tsuyomi-hero-lead { font-size: 1.12rem; font-weight: 700; margin-bottom: 8px; }
.tsuyomi-primary-action { font-size: 1.02rem; padding: 12px 20px; }
.tsuyomi-next-card h3 { margin-bottom: 8px; }
.tsuyomi-login-required h2 { margin-bottom: 8px; }
.tsuyomi-logout-card { background: #f9fafb; text-align: center; }
.tsuyomi-logout-card p { margin: 6px 0; }
.tsuyomi-logout-link { color: #667085; text-decoration: underline; font-size: .92em; }
@media (max-width: 680px) {
  body { padding-bottom: 68px; }
  .tsuyomi-primary-action { display: block; width: 100%; box-sizing: border-box; }
  .tsuyomi-floating-button { right: 14px; bottom: 14px; padding: 13px 18px; }
}

/* v0.2.4.7: user context and duplicate-heading adjustment */
.tsuyomi-user-context { margin: 0 0 14px; font-weight: 700; color: #111827; }

/* v0.2.4.10: 本人向け観測コメントエンジン */
.tsuyomi-observation-feedback { border-color: #c7d2fe; background: #fbfcff; }
.tsuyomi-observation-feedback h3 { margin-bottom: 10px; }
.tsuyomi-feedback-source { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 10px; padding: 10px 12px; }
.tsuyomi-feedback-list { margin: 12px 0 16px 1.2em; padding: 0; }
.tsuyomi-feedback-list li { margin-bottom: 10px; line-height: 1.65; }
.tsuyomi-next-observation { background: #fff7ed; border: 1px solid #fed7aa; border-radius: 12px; padding: 12px 14px; margin: 14px 0; }
.tsuyomi-next-observation p { margin: 6px 0 0; }
.tsuyomi-first-insight-note { background: #eff6ff; border-color: #bfdbfe; }

/* v0.2.4.12: 発見体験強化版 */
.tsuyomi-discovery-card { border-color: #bfdbfe; background: linear-gradient(180deg,#fbfdff 0%,#fff 100%); }
.tsuyomi-discovery-card h3 { margin-bottom: 12px; }
.tsuyomi-stage-box { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 14px; padding: 14px; margin: 12px 0 14px; }
.tsuyomi-stage-box strong { display: block; font-size: 1.14rem; margin: 4px 0 6px; }
.tsuyomi-stage-box p { margin: 0; }
.tsuyomi-stage-label { display: inline-block; font-size: .78rem; font-weight: 700; color: #1d4ed8; letter-spacing: .04em; }
.tsuyomi-discovery-marks { margin: 14px 0; }
.tsuyomi-mark-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 8px; }
.tsuyomi-mark { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 10px 12px; }
.tsuyomi-mark strong { display: block; margin-bottom: 4px; }
.tsuyomi-mark span { display: block; color: #475569; font-size: .92em; line-height: 1.55; }
.tsuyomi-discovery-main { margin: 16px 0; }
.tsuyomi-discovery-main h4 { margin: 0 0 8px; }
.tsuyomi-discovery-lead { font-size: 1.06rem; line-height: 1.7; }
.tsuyomi-discovery-lead strong { background: #fef3c7; border-radius: 6px; padding: 0 4px; }
.tsuyomi-mission-box { background: #fff7ed; border-color: #fed7aa; }
.tsuyomi-continue-note { color: #7c2d12; font-size: .95em; margin-top: 10px !important; }
@media (max-width: 680px) {
  .tsuyomi-mark-list { grid-template-columns: 1fr; }
}

/* v0.2.4.13: 観測履歴・発見履歴 */
.tsuyomi-history-intro h2 { margin-top: 4px; }
.tsuyomi-history-card { margin-bottom: 22px; }
.tsuyomi-history-card-header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.tsuyomi-history-card-header h3 { margin: 0; }
.tsuyomi-history-count { display: inline-block; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 999px; padding: 5px 10px; color: #334155; font-size: .9em; font-weight: 700; }
.tsuyomi-history-examples { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 12px 14px; margin: 14px 0; }
.tsuyomi-history-examples ul { margin: 8px 0 0 1.2em; padding: 0; }
.tsuyomi-history-examples li { margin: 4px 0; }
.tsuyomi-monthly-summary { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 12px; padding: 12px 14px; margin: 14px 0; }
.tsuyomi-monthly-summary p { margin: 6px 0; }
.tsuyomi-monthly-summary-pending { background: #fff; }
@media (max-width: 680px) {
  .tsuyomi-history-card-header { display: block; }
  .tsuyomi-history-count { margin-top: 8px; }
}
