/*
  COLOR SYSTEM

  --c-link      #0066cc  アクション色   : 記事リンク・セクション左ボーダー
  --c-visited   #551a8b  状態色(訪問済): visited リンク
  --c-error     #dc2626  注意色(失敗)  : 取得失敗フィード
  --c-updating  #d97706  進行色(更新中): 更新中バッジ
  --c-hatena    #b45309  ブックマーク数: はてなブックマーク件数表示
  --c-text-1    #111827  テキスト主    : ボディ・ブログ名
  --c-text-2    #6b7280  テキスト副    : 日時
  --c-text-3    #9ca3af  テキスト弱    : 空状態・注釈
  --c-header-bg #1c1917  背景(ブランド): ヘッダーのみ
*/

:root {
  --c-link:       #0066cc;
  --c-visited:    #551a8b;
  --c-error:      #dc2626;
  --c-updating:   #d97706;
  --c-hatena:     #b45309;
  --c-text-1:     #111827;
  --c-text-2:     #6b7280;
  --c-text-3:     #9ca3af;
  --c-header-bg:  #1c1917;
  --c-border:     #e4e0d8;
  --c-bg-page:    #f5f4f0;
  --c-bg-surface: #ffffff;
  --c-bg-header:  #f8f7f4;  /* フィードヘッダー背景 */
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
               "Hiragino Kaku Gothic ProN", "Hiragino Sans",
               "BIZ UDPGothic", "Noto Sans JP", Meiryo, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  background: var(--c-bg-page);
  color: var(--c-text-1);
}

a                { color: var(--c-link); text-decoration: none; }
a:hover          { text-decoration: underline; }
a:visited        { color: var(--c-visited); }

/* ============================================================
   HEADER  — sticky, dark, minimal
   ============================================================ */
#header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--c-header-bg);
  height: 48px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#site-name {
  color: #f4f4f5;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}
#site-name:hover   { color: #fff; text-decoration: none; }
#site-name:visited { color: #f4f4f5; }

#header-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

#last-update {
  color: #a1a1aa;
  font-size: 13px;
}

.rss-link {
  color: #a1a1aa;
  font-size: 12px;
  border: 1px solid #52525b;
  padding: 2px 8px;
  border-radius: 3px;
  text-decoration: none;
}
.rss-link:hover   { color: #fff; border-color: #a1a1aa; text-decoration: none; }
.rss-link:visited { color: #a1a1aa; }

.badge-updating {
  background: var(--c-updating);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 3px;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.55; }
}

/* ============================================================
   NAV  — カテゴリフィルター
   ============================================================ */
#nav {
  background: var(--c-bg-surface);
  border-bottom: 1px solid var(--c-border);
  position: sticky;
  top: 48px;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  max-width: 1100px;
  margin: 0;
  padding: 0 12px;
}

.nav-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  padding: 11px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text-2);
  font-family: inherit;
  transition: color 0.12s, border-color 0.12s;
  line-height: 1;
}
.nav-btn:hover   { color: var(--c-link); }
.nav-btn--active { color: var(--c-link); border-bottom-color: var(--c-link); }

/* ============================================================
   HERO  — 注目記事 + 広告バナー
   ============================================================ */
#hero {
  background: var(--c-bg-surface);
  border-bottom: 1px solid var(--c-border);
}

#hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 16px;
  display: flex;
  gap: 20px;
  align-items: start;
  min-height: 90px;
}

#hero-picks { flex: 1; min-width: 0; }

.hero-picks-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--c-text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.hero-picks-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.hero-picks-list li {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.hero-pick-link {
  font-size: 14px;
  color: var(--c-link);
  text-decoration: none;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.hero-pick-link:hover   { text-decoration: underline; }
.hero-pick-link:visited { color: var(--c-visited); }

.hero-pick-meta {
  font-size: 11px;
  font-weight: 700;
  color: var(--c-hatena);
  flex-shrink: 0;
  white-space: nowrap;
}

/* ============================================================
   RANKING (hero内)
   ============================================================ */
#ranking {
  flex: 1;
  min-width: 0;
}

.ranking-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--c-text-2);
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 10px;
}
.ranking-title-icon { font-size: 14px; }
.ranking-title-sub  {
  font-size: 11px;
  font-weight: 400;
  color: var(--c-text-3);
}

.ranking-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.ranking-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 5px 0;
  border-bottom: 1px solid #f0ede6;
}
.ranking-item:last-child { border-bottom: none; }

/* 順位バッジ */
.rank-num {
  font-size: 13px;
  font-weight: 700;
  font-family: "SF Mono", "Consolas", monospace;
  width: 22px;
  flex-shrink: 0;
  text-align: center;
  line-height: 1.6;
  color: var(--c-text-3);
}
.rank-1 .rank-num { color: #b8860b; font-size: 15px; }
.rank-2 .rank-num { color: #808080; font-size: 14px; }
.rank-3 .rank-num { color: #a0522d; font-size: 14px; }

/* サムネイル */
.rank-thumb {
  width: 80px;
  height: 54px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
  background: var(--c-bg-page);
  display: block;
}
.rank-thumb--empty {
  width: 80px;
  height: 54px;
  border-radius: 3px;
  flex-shrink: 0;
  background: var(--c-bg-page);
}

.rank-body {
  flex: 1;
  min-width: 0;
}

.rank-title {
  display: block;
  font-size: 14px;
  line-height: 1.5;
  color: var(--c-link);
  text-decoration: none;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.rank-title:hover   { text-decoration: underline; }
.rank-title:visited { color: var(--c-visited); }

.rank-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.rank-source {
  font-size: 11px;
  color: var(--c-text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.rank-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--c-hatena);
  white-space: nowrap;
}

.ad-block--hero {
  width: 300px;
  flex-shrink: 0;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ============================================================
   LAYOUT  — 2カラム
   ============================================================ */
#layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 16px 32px;
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 16px;
  align-items: start;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
#content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ============================================================
   FEED BLOCK
   ============================================================ */
.feed-block {
  background: var(--c-bg-surface);
  border: 1px solid var(--c-border);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* フィードヘッダー */
.feed-name {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px 7px 12px;
  background: var(--c-bg-header);
  border-bottom: 1px solid var(--c-border);
  border-left: 3px solid var(--c-link);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}
.feed-name--error {
  border-left-color: var(--c-error);
}

.feed-name > a {
  flex: 1;
  min-width: 0;
  color: var(--c-text-1);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.feed-name > a:hover    { color: var(--c-link); text-decoration: underline; }
.feed-name > a:visited  { color: var(--c-text-1); }

.badge-error {
  font-size: 10px;
  font-weight: 600;
  color: var(--c-error);
  border: 1px solid var(--c-error);
  padding: 1px 5px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* ── フィードヘッダー内コントロールボタン ── */
.feed-controls {
  display: flex;
  align-items: center;
  gap: 1px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.15s;
}
.feed-block:hover .feed-controls { opacity: 1; }

.feed-ctrl-btn {
  background: none;
  border: none;
  cursor: pointer;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: var(--c-text-3);
  font-size: 13px;
  line-height: 1;
  transition: background 0.1s, color 0.1s;
  padding: 0;
}
.feed-ctrl-btn:hover          { background: var(--c-bg-page); color: var(--c-text-1); }
.feed-ctrl-btn--hide:hover    { color: var(--c-error); }

/* ============================================================
   ARTICLE LIST
   ============================================================ */
.article-list { list-style: none; }

.article-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 14px;
  border-bottom: 1px solid #edeae2;
  transition: background 0.1s;
}
.article-row:last-child { border-bottom: none; }
.article-row:hover      { background: #fffdf5; }

.article-time {
  color: var(--c-text-3);
  font-size: 12px;
  font-family: "SF Mono", "Consolas", "Menlo", monospace;
  white-space: nowrap;
  width: 86px;
  flex-shrink: 0;
  overflow: hidden;
}

.article-title {
  font-size: 15px;
  line-height: 1.55;
  color: var(--c-link);
  flex: 1;
  min-width: 0;
}
.article-title:visited { color: var(--c-visited); }
.article-title:hover   { text-decoration: underline; }

.hatena-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--c-hatena);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ============================================================
   EMPTY / ERROR STATES
   ============================================================ */
.state-loading,
.state-empty {
  padding: 14px 12px;
  color: var(--c-text-3);
  font-size: 14px;
  text-align: center;
}

/* ============================================================
   AD BLOCKS
   ============================================================ */
.ad-block {
  background: var(--c-bg-surface);
  border: 1px solid var(--c-border);
  border-radius: 6px;
  overflow: hidden;
  text-align: center;
}

/* 広告ラベル */
.ad-label {
  display: block;
  font-size: 10px;
  color: var(--c-text-3);
  letter-spacing: 0.06em;
  padding: 4px 0 2px;
}

.ad-block--sidebar {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ad-block--inline {
  min-height: 100px;
  padding: 4px 0;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
#sidebar {
  position: sticky;
  top: 92px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

.sb-section {
  background: var(--c-bg-surface);
  border: 1px solid var(--c-border);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.sb-title {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: var(--c-bg-header);
  border-bottom: 1px solid var(--c-border);
  font-size: 13px;
  font-weight: 700;
  color: var(--c-text-1);
}

.sb-count {
  font-size: 12px;
  font-weight: 400;
  color: var(--c-text-3);
}

.btn-refresh {
  display: block;
  margin: 10px 12px 4px;
  padding: 7px 0;
  background: var(--c-link);
  color: #fff !important;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.15s;
}
.btn-refresh:hover   { background: #1e40af; text-decoration: none; }
.btn-refresh:visited { color: #fff !important; }

.sb-note {
  padding: 3px 12px 10px;
  font-size: 12px;
  color: var(--c-text-3);
}

.recent-list {
  list-style: none;
  max-height: 460px;
  overflow-y: auto;
}

.recent-item {
  border-bottom: 1px solid var(--c-border);
  padding: 7px 12px;
}
.recent-item:last-child { border-bottom: none; }

.recent-link {
  display: block;
  font-size: 13px;
  line-height: 1.5;
  color: var(--c-link);
  text-decoration: none;
  margin-bottom: 2px;
}
.recent-link:hover   { text-decoration: underline; }
.recent-link:visited { color: var(--c-visited); }

.recent-meta {
  display: block;
  font-size: 11px;
  color: var(--c-text-3);
}

/* 収録サイトリスト */
.site-list {
  list-style: none;
  padding: 4px 0;
  max-height: 280px;
  overflow-y: auto;
}
.site-list li            { border-bottom: 1px solid #f3f4f6; }
.site-list li:last-child { border-bottom: none; }

.site-list a {
  display: block;
  padding: 5px 12px;
  font-size: 13px;
  color: var(--c-text-2);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.site-list a:hover            { color: var(--c-link); background: var(--c-bg-page); text-decoration: none; }
.site-list a:visited          { color: var(--c-text-3); }
.site-list a.site-link--error { color: var(--c-error); }

/* ============================================================
   FOOTER
   ============================================================ */
#footer {
  border-top: 1px solid var(--c-border);
  margin-top: 8px;
}
#footer a       { color: var(--c-text-3); }
#footer a:hover { color: var(--c-text-2); }

#footer-sites {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 16px 12px;
  border-bottom: 1px solid var(--c-border);
}

.footer-sites-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--c-text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.footer-sites-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
}

.footer-sites-list li {
  display: flex;
  align-items: center;
}
.footer-sites-list li::after {
  content: "・";
  color: var(--c-border);
  font-size: 12px;
}
.footer-sites-list li:last-child::after { content: ""; }

.footer-sites-list a {
  font-size: 12px;
  color: var(--c-text-3);
  text-decoration: none;
  padding: 2px 5px;
}
.footer-sites-list a:hover {
  color: var(--c-text-2);
  text-decoration: underline;
}

.footer-copy {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 16px;
  font-size: 12px;
  color: var(--c-text-3);
  text-align: center;
}

/* ============================================================
   SETTINGS BUTTON (nav内)
   ============================================================ */
#settings-btn {
  background: none;
  border: 1px solid var(--c-border);
  border-radius: 4px;
  cursor: pointer;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-2);
  font-family: inherit;
  white-space: nowrap;
  margin-right: 12px;
  transition: color 0.12s, border-color 0.12s;
}
#settings-btn:hover { color: var(--c-link); border-color: var(--c-link); }

/* ============================================================
   SETTINGS DRAWER
   ============================================================ */
#settings-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 200;
}
#settings-overlay.open { display: block; }

#settings-drawer {
  position: fixed;
  top: 0;
  right: -360px;
  width: 340px;
  height: 100vh;
  background: #fff;
  z-index: 210;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0,0,0,0.12);
  transition: right 0.25s ease;
}
#settings-drawer.open { right: 0; }

.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--c-border);
  background: var(--c-bg-header);
  flex-shrink: 0;
}
.settings-header-left h2 {
  font-size: 15px;
  font-weight: 700;
  color: var(--c-text-1);
}
.settings-count {
  font-size: 12px;
  color: var(--c-text-3);
  margin-top: 2px;
  display: block;
}
.settings-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: var(--c-text-2);
  padding: 4px 8px;
  line-height: 1;
}
.settings-close:hover { color: var(--c-text-1); }

.settings-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0 16px;
}

.settings-group { margin-bottom: 4px; }

.settings-group-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--c-text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 10px 16px 5px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.1s;
}
.settings-row:hover    { background: var(--c-bg-page); }
.settings-row.dragging { opacity: 0.4; background: var(--c-bg-page); }

.drag-handle {
  font-size: 16px;
  color: var(--c-text-3);
  cursor: grab;
  padding-right: 8px;
  flex-shrink: 0;
  user-select: none;
}
.drag-handle:active { cursor: grabbing; }

.settings-feed-name {
  font-size: 14px;
  color: var(--c-text-1);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 12px;
}

/* トグルスイッチ */
.toggle-switch {
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.toggle-slider {
  position: absolute;
  inset: 0;
  background: #d1d5db;
  border-radius: 22px;
  transition: background 0.2s;
  cursor: pointer;
}
.toggle-slider::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + .toggle-slider { background: var(--c-link); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }

.settings-footer {
  padding: 16px 16px 4px;
  border-top: 1px solid var(--c-border);
  margin-top: 8px;
}
.btn-reset {
  background: none;
  border: 1px solid var(--c-border);
  border-radius: 4px;
  cursor: pointer;
  padding: 7px 16px;
  font-size: 13px;
  color: var(--c-text-2);
  font-family: inherit;
  width: 100%;
  transition: border-color 0.12s, color 0.12s;
}
.btn-reset:hover { border-color: var(--c-link); color: var(--c-link); }

/* ============================================================
   フッター提案ボタン
   ============================================================ */
.footer-suggest-wrap {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--c-border);
}
.footer-suggest-btn {
  background: none;
  border: 1px solid var(--c-border);
  border-radius: 4px;
  cursor: pointer;
  padding: 6px 14px;
  font-size: 13px;
  color: var(--c-text-2);
  font-family: inherit;
  transition: color 0.12s, border-color 0.12s;
}
.footer-suggest-btn:hover { color: var(--c-link); border-color: var(--c-link); }

/* ============================================================
   サイト提案モーダル
   ============================================================ */
#suggest-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 300;
}
#suggest-overlay.open { display: block; }

#suggest-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%);
  width: min(480px, calc(100vw - 32px));
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  z-index: 310;
  display: none;
  flex-direction: column;
  max-height: 90vh;
  overflow: hidden;
}
#suggest-modal.open {
  display: flex;
  animation: modal-in 0.18s ease;
}
@keyframes modal-in {
  from { opacity: 0; transform: translate(-50%, -46%); }
  to   { opacity: 1; transform: translate(-50%, -48%); }
}

.suggest-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--c-border);
  background: var(--c-bg-header);
  flex-shrink: 0;
}
.suggest-header h2 { font-size: 15px; font-weight: 700; }

.suggest-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: var(--c-text-2);
  padding: 4px 8px;
  line-height: 1;
}
.suggest-close:hover { color: var(--c-text-1); }

.suggest-body {
  padding: 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.suggest-note {
  font-size: 13px;
  color: var(--c-text-2);
  background: #fffbf0;
  border: 1px solid #fde68a;
  border-radius: 4px;
  padding: 8px 12px;
  line-height: 1.6;
}

.suggest-label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-1);
}

.suggest-req {
  font-size: 11px;
  color: var(--c-error);
  font-weight: 400;
  margin-left: 4px;
}

.suggest-input {
  font-family: inherit;
  font-size: 14px;
  border: 1px solid var(--c-border);
  border-radius: 4px;
  padding: 7px 10px;
  width: 100%;
  color: var(--c-text-1);
  background: #fff;
  transition: border-color 0.12s;
}
.suggest-input:focus {
  outline: none;
  border-color: var(--c-link);
  box-shadow: 0 0 0 3px rgba(0,102,204,0.1);
}
.suggest-textarea {
  resize: vertical;
  min-height: 70px;
}

.suggest-submit {
  background: var(--c-link);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  padding: 9px 0;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  width: 100%;
  transition: background 0.15s;
}
.suggest-submit:hover    { background: #1e40af; }
.suggest-submit:disabled { background: #9ca3af; cursor: not-allowed; }

.suggest-msg-ok  { font-size: 13px; color: #16a34a; font-weight: 600; }
.suggest-msg-err { font-size: 13px; color: var(--c-error); font-weight: 600; }

/* ============================================================
   SNSシェアボタン
   ============================================================ */
#share-btns {
  position: fixed;
  bottom: 24px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
}

#share-btns a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
  transition: opacity .15s, transform .15s;
}
#share-btns a:hover {
  opacity: .85;
  transform: scale(1.08);
  text-decoration: none;
}

#share-x    { background: #000; color: #fff; }
#share-line { background: #06c755; color: #fff; }

/* ============================================================
   RESPONSIVE  — スマホ: サイドバーをメインの下へ
   ============================================================ */
@media (max-width: 720px) {
  #layout {
    grid-template-columns: 1fr;
    padding: 10px 10px 24px;
    gap: 10px;
  }

  #sidebar {
    position: static;
    top: auto;
    max-height: none;
    overflow-y: visible;
    order: 2;
  }

  #content { order: 1; }

  #hero-inner { flex-direction: column; }

  .ad-block--hero { width: 100%; }

  /* ランキング: モバイルでは7位以降を折りたたむ */
  .ranking-item:nth-child(n+8) { display: none; }

  .rank-source { max-width: 90px; }

  /* モバイルではサムネイルを小さく */
  .rank-thumb, .rank-thumb--empty { width: 60px; height: 42px; }

  .nav-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 10px;
  }

  .nav-btn {
    padding: 10px 12px;
    white-space: nowrap;
  }

  /* モバイルではコントロール常時表示 */
  .feed-controls { opacity: 1; }
}

/* ============================================================
   SEO: スクリーンリーダー専用見出し
   ============================================================ */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   フッター説明文（SEO用テキスト）
   ============================================================ */
.footer-desc {
  max-width: 760px;
  margin: 0 auto 14px;
  padding: 0 16px;
  font-size: 12px;
  line-height: 1.8;
  color: var(--c-text-2);
  text-align: left;
}

/* ============================================================
   ブックマーク促進バー
   ============================================================ */
.bookmark-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  background: linear-gradient(0deg, #fffaf0, #fff7e6);
  border-bottom: 1px solid #f0e2c0;
  font-size: 13px;
  color: #5b4a1f;
}
.bookmark-bar[hidden] { display: none; }

.bm-icon { font-size: 15px; flex-shrink: 0; }

.bm-msg {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.4;
}

.bm-kbd {
  flex-shrink: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 700;
  color: #1c1917;
  background: #fff;
  border: 1px solid #d6c79a;
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 2px 7px;
  white-space: nowrap;
}

.bm-btn {
  flex-shrink: 0;
  border: 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: var(--c-link);
  border-radius: 6px;
  padding: 6px 14px;
  transition: background .15s;
}
.bm-btn:hover { background: #0052a3; }

.bm-close {
  flex-shrink: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  color: #a08a55;
  padding: 4px 6px;
  border-radius: 5px;
}
.bm-close:hover { color: #5b4a1f; background: rgba(0,0,0,.05); }

/* 再訪問者向けの押し上げ表示 */
.bookmark-bar--return {
  background: linear-gradient(0deg, #fff4e0, #ffedcc);
  border-bottom-color: #ecd29a;
}
.bookmark-bar--return .bm-msg { font-weight: 700; color: #7a5a14; }

/* ショートカット案内時の強調 */
.bookmark-bar--hint .bm-kbd {
  animation: bm-pulse 1s ease-in-out 2;
}
@keyframes bm-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0,102,204,0); }
  50%      { transform: scale(1.12); box-shadow: 0 0 0 4px rgba(0,102,204,.18); }
}

@media (max-width: 600px) {
  .bookmark-bar { flex-wrap: wrap; font-size: 12px; padding: 8px 12px; gap: 8px; }
  .bm-msg { flex: 1 1 100%; order: -1; }
}
