/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

* { box-sizing: border-box; }
body { font-family: "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif; color: #333; margin: 0; background: #f9f9f9; }

.container { max-width: 800px; margin: 0 auto; padding: 0 16px; }

header { background: #e74c3c; padding: 12px 0; }
header .site-title { color: #fff; text-decoration: none; font-size: 20px; font-weight: bold; }
footer { text-align: center; padding: 24px 0; color: #999; font-size: 13px; margin-top: 40px; }

main { padding: 24px 0; }

.flash { padding: 10px 16px; border-radius: 4px; margin-bottom: 16px; }
.flash-notice { background: #d4edda; color: #155724; }
.flash-alert  { background: #f8d7da; color: #721c24; }

/* Hero / subscribe form */
.hero { text-align: center; padding: 40px 0 32px; }
.hero h1 { font-size: 28px; margin-bottom: 8px; }
.hero p { color: #666; margin-bottom: 20px; }
.subscribe-form { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.subscribe-form input[type=email] { padding: 10px 14px; border: 1px solid #ccc; border-radius: 4px; width: 280px; font-size: 15px; }
.subscribe-form input[type=submit] { padding: 10px 20px; background: #e74c3c; color: #fff; border: none; border-radius: 4px; font-size: 15px; cursor: pointer; }
.subscribe-form input[type=submit]:hover { background: #c0392b; }
.note { font-size: 12px; color: #999; margin-top: 8px; }

/* Archives */
.archives h2 { border-bottom: 2px solid #e74c3c; padding-bottom: 6px; }
.archives ul { list-style: none; padding: 0; }
.archives li { padding: 10px 0; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; }
.archives li a { color: #333; text-decoration: none; }
.archives li a:hover { color: #e74c3c; }
.date { color: #999; font-size: 13px; white-space: nowrap; }

/* Book card */
.book-card { display: flex; gap: 16px; border: 1px solid #ddd; border-radius: 6px; padding: 16px; margin-bottom: 20px; background: #fff; }
.book-cover { flex-shrink: 0; width: 100px; }
.book-cover img { width: 100%; height: auto; display: block; object-fit: contain; }
.book-detail { flex: 1; min-width: 0; }

@media (max-width: 600px) {
  .book-card { flex-direction: column; }
  .book-cover { width: 100%; text-align: center; }
  .book-cover img { max-width: 140px; max-height: 180px; width: auto; margin: 0 auto; }
}
.book-title { font-size: 17px; font-weight: bold; margin: 0 0 4px; }
.book-meta { font-size: 13px; color: #666; margin: 0 0 8px; }
.book-desc { font-size: 13px; color: #555; margin: 0 0 12px; }
.book-links { display: flex; gap: 6px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 5px 12px; border-radius: 4px; font-size: 12px; text-decoration: none; }
.btn-amazon  { background: #FF9900; color: #fff; }
.btn-rakuten { background: #BF0000; color: #fff; }
.btn-yomitaku { background: #2ecc71; color: #fff; }
.btn-qiita   { background: #55c500; color: #fff; }

/* Qiita article snippet */
.qiita-article { margin: 10px 0 8px; padding: 8px 12px; background: #f6fff2; border-left: 3px solid #55c500; border-radius: 0 4px 4px 0; }
.qiita-article-title { font-size: 13px; font-weight: bold; color: #3a8a00; margin: 0 0 4px; }
.qiita-article-excerpt { font-size: 12px; color: #555; margin: 0; line-height: 1.5; }

.issue-date { color: #999; font-size: 14px; }
.no-issues { text-align: center; color: #999; padding: 40px 0; }

/* Unsubscribe */
.unsubscribe { max-width: 480px; margin: 40px auto; text-align: center; }
.unsubscribe input[type=submit] { padding: 10px 24px; background: #e74c3c; color: #fff; border: none; border-radius: 4px; font-size: 15px; cursor: pointer; margin-right: 12px; }

