:root {
  --width: 1120px;
  --background-color: #f5f7fa;
  --heading-color: #172b3a;
  --text-color: #465569;
  --link-color: #176b64;
  --accent-color: #176b64;
  --border-color: #e3e9ef;
  --muted-color: #65758a;
  --surface-color: #fff;
}
body { max-width: var(--width); padding: 0 24px 32px; }
.site-header { padding: 28px 0 22px; }
.site-header > .title > h1 { font-size: 24px; letter-spacing: -.03em; }
.channel-avatar { width: 38px; height: 38px; border-radius: 12px; }
.site-navigation { padding: 14px 0; border-bottom: 1px solid var(--border-color); }
.site-navigation ul { gap: 8px; }
.site-navigation .feed-tab { display: block; min-height: 44px; padding: 9px 14px; border: 0; border-radius: 9px; background: transparent; font: inherit; text-decoration: none; color: var(--muted-color); font-size: 14px; cursor: pointer; }
.site-navigation .feed-tab[aria-selected="true"] { background: #e0efec; color: var(--accent-color); font-weight: 650; }
.site-navigation .feed-tab:focus-visible { outline: 3px solid var(--accent-color); outline-offset: 3px; }
.feed-panel[hidden] { display: none !important; }
.site-navigation .feed-tab { transition: background-color 180ms ease, color 180ms ease; }
.feed-panel.is-entering { animation: feed-enter 220ms cubic-bezier(.2, .7, .2, 1); }
.posts-feed.is-entering { animation: feed-enter 180ms ease-out; }
@keyframes feed-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .site-navigation .feed-tab { transition: none; }
  .feed-panel.is-entering, .posts-feed.is-entering { animation: none; }
}
.feed-panel > .news-pagination:first-child { margin: 0 0 20px; border-top: 0; padding-top: 0; }
.feed-note { margin: 0 0 18px; color: var(--muted-color); font-size: 12px; line-height: 1.7; }
body.feed .post-content .selected-summary { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; max-height: 6.8em; overflow: hidden; margin: 0; flex-shrink: 0; }
body.feed .post-content .selected-badge { margin: auto 0 0; padding-top: 12px; color: var(--accent-color); font-size: 12px; flex-shrink: 0; }
.feed-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; padding: 20px; margin-bottom: 18px; border: 1px solid var(--border-color); border-radius: 14px; background: #fff; }
.feed-heading { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.feed-heading h2 { margin: 0; font-size: 20px; }
.feed-count, .full-count { padding: 4px 9px; border-radius: 6px; background: #e0efec; color: #176b64; font-size: 12px; font-weight: 650; }
.feed-refresh { min-height: 44px; padding: 0 14px; border: 1px solid #bfd4d0; border-radius: 8px; background: #fff; color: #176b64; font: inherit; font-size: 13px; cursor: pointer; }
.feed-refresh:disabled { opacity: .6; cursor: wait; }
.feed-toolbar .feed-note, .feed-sync, .feed-hint, .full-note, .full-sync, .feed-details { grid-column: 1 / -1; margin: 0; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.full-note { color: var(--muted-color); }
.full-sync { color: #176b64; }
.feed-details { color: var(--muted-color); }
.feed-details summary { width: fit-content; cursor: pointer; }
.feed-details[open] .feed-hint { margin-top: 8px; }
.feed-sync { color: #176b64; }
.feed-sync.sync-warning, .full-sync.sync-warning { color: #9a4b0b; }
.feed-hint { color: var(--muted-color); }
.news-pagination { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
.selected-results > .news-pagination:first-child, .full-results > .news-pagination:first-child, .full-toolbar + .news-pagination { margin-top: 0; border-top: 0; padding-top: 0; }
.news-pagination > .page-button:first-child { justify-self: start; }
.news-pagination > .page-button:nth-child(3) { justify-self: end; }
.page-numbers { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; min-height: 44px; max-width: 100%; overflow-x: auto; padding-bottom: 4px; }
.page-numbers > * { flex-shrink: 0; }
.page-tools { grid-column: 1 / -1; display: flex; justify-content: center; align-items: center; gap: 8px; }
.page-jump { min-height: 44px; max-width: 130px; padding: 0 10px; border: 1px solid var(--border-color); border-radius: 8px; background: #fff; color: var(--accent-color); font: inherit; font-size: 13px; }
.page-jump:focus-visible { outline: 3px solid var(--accent-color); outline-offset: 3px; }
.page-number { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border: 1px solid var(--border-color); border-radius: 8px; color: #176b64; background: #fff; text-decoration: none; font-size: 14px; }
.page-number[aria-current="page"] { background: #176b64; border-color: #176b64; color: #fff; font-weight: 700; }
.news-pagination .page-status { box-sizing: border-box; width: 210px; padding: 10px 14px; border-radius: 10px; background: #e0efec; color: #124c47; font-size: 20px; font-weight: 750; }
.news-pagination .page-status small { height: 36px; min-height: 36px; line-height: 18px; margin-top: 3px; color: #526c69; }
.feed-refresh:focus-visible, .news-pagination a:focus-visible { outline: 3px solid #176b64; outline-offset: 3px; }
.feed-empty { grid-column: 1 / -1; padding: 28px 20px; text-align: center; border: 1px dashed #bfd4d0; border-radius: 12px; }
.desktop-search, .mobile-search form { border-radius: 9px; }
#main-content { padding: 24px 0; }
.posts-feed { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 0; }
.posts-feed > li { margin: 0; min-width: 0; }
body.feed .post-entry {
  display: flex; flex-direction: column; height: 320px; box-sizing: border-box;
  margin: 0; padding: 22px; border: 1px solid var(--border-color);
  border-radius: 14px; background: var(--surface-color);
}
body.feed .post-entry .hn-story { display: block; order: 0; min-height: 53px; }
body.feed .hn-story h2 { margin: 0; font-size: 17px; line-height: 1.55; font-weight: 650; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
body.feed .hn-story a { text-decoration: none; color: var(--heading-color); }
body.feed .hn-story a:hover { color: var(--accent-color); text-decoration: underline; }
body.feed .post-meta { order: 1; margin: 8px 0 12px; font-size: 12px; }
body.feed .post-meta p { margin: 0; }
body.feed .post-meta a { color: var(--muted-color); }
body.feed .timeline-dot { display: none; }
body.feed .post-content { display: flex; flex-direction: column; flex: 1; min-height: 0; order: 2; margin: 0; padding: 0; font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
body.feed .link_preview_site_name { display: block; margin-bottom: 8px; color: var(--accent-color); font-size: 11px; font-weight: 700; letter-spacing: .03em; }
.pagination { margin-top: 24px; }
.news-pagination { align-items: center; gap: 14px; padding: 18px 0; margin: 20px 0; border-top: 1px solid var(--border-color); }
#main-content > .news-pagination:first-child { margin: 0 0 20px; border-top: 0; padding-top: 0; }
.news-pagination .page-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border: 1px solid #bfd4d0; border-radius: 9px; background: #fff; color: #176b64; font-size: 14px; font-weight: 600; text-decoration: none; }
.news-pagination .disabled { color: #788692; border-color: var(--border-color); background: #edf1f5; }
.page-status { min-width: 110px; text-align: center; color: var(--heading-color); font-size: 16px; font-weight: 650; }
.page-status small { display: block; max-width: 240px; color: var(--muted-color); font-size: 11px; font-weight: 400; }
.news-pagination .page-latest { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--border-color); border-radius: 8px; font-size: 13px; color: var(--accent-color); text-decoration: none; }
@media (max-width: 720px) { .news-pagination { gap: 8px; } .news-pagination .page-button { padding: 0 10px; font-size: 12px; } .page-status { min-width: 80px; } .page-latest { flex-basis: 100%; text-align: center; } }
.site-footer { padding-top: 20px; color: var(--muted-color); font-size: 12px; }
@media (hover: hover) { body.feed .post-entry:hover { border-color: #b9d2cf; } }
@media (max-width: 720px) {
  .feed-toolbar { padding: 16px; gap: 10px; }
  .feed-toolbar .feed-note, .full-note, .feed-sync, .full-sync { min-height: 41px; }
  .feed-heading { gap: 8px; }
  .feed-heading { display: grid; grid-template-columns: 1fr; }
  .feed-heading > span { justify-self: start; }
  .feed-toolbar .feed-refresh { align-self: start; }
  .feed-heading h2 { font-size: 18px; }
  .news-pagination .page-status { width: 130px; padding: 8px 10px; font-size: 18px; }
  .news-pagination .page-status { min-width: 96px; }
  .news-pagination .page-status small { height: 54px; min-height: 54px; }
  body { padding: 0 16px 24px; }
  .site-header { padding: 20px 0 16px; }
  .site-header { grid-template-columns: 38px minmax(0, 1fr) auto; gap: 12px; }
  .site-header .social-links { grid-column: 3; grid-row: 1; gap: 12px; }
  .posts-feed { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  body.feed .post-entry { padding: 18px; height: 330px; }
}
