/* ===== CSS Variables ===== */
:root {
  --bg: #ffffff;
  --bg-secondary: #f7f7f7;
  --text: #1a1a1a;
  --text-muted: #6b6b6b;
  --border: #e8e8e8;
  --accent: #ff6600;
  --accent-light: #fff3eb;
  --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
  --header-bg: #ffffff;
  --header-shadow: 0 2px 6px rgba(0, 0, 0, 0.07);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --radius: 8px;
  --header-h: 54px;
  --header-h-mobile: 84px;
  --catbar-h: 38px;
}

[data-theme="dark"] {
  --bg: #111111;
  --bg-secondary: #1c1c1c;
  --text: #e8e8e8;
  --text-muted: #999999;
  --border: #2a2a2a;
  --accent: #ff7722;
  --accent-light: #2a1500;
  --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  --header-bg: #161616;
  --header-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

/* ===== Reset ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.2s, color 0.2s;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

img {
  display: block;
  max-width: 100%;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--header-shadow);
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
  height: 54px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.logo:hover {
  text-decoration: none;
}

.main-nav {
  display: flex;
  gap: 4px;
  flex: 1;
}

.nav-link {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 20px;
  transition: all 0.15s;
}

.nav-label-mobile {
  display: none;
}

.nav-link:hover {
  background: var(--bg-secondary);
  color: var(--text);
  text-decoration: none;
}

.nav-link.active {
  background: var(--accent);
  color: #fff;
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 10px;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--text);
  transition: all 0.15s;
  flex-shrink: 0;
}

.theme-toggle:hover {
  background: var(--bg-secondary);
}

.header-follow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.header-follow-label {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.header-follow-icon {
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.15s;
}

.header-follow-icon svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.header-follow-icon:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-light);
  text-decoration: none;
}

/* ===== Category Bar ===== */
.category-bar {
  position: sticky;
  top: 54px;
  z-index: 99;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.category-bar::-webkit-scrollbar {
  display: none;
}

.category-bar-inner {
  display: flex;
  gap: 6px;
  padding: 8px 16px;
  width: max-content;
  min-width: 100%;
  max-width: 960px;
  margin: 0 auto;
  white-space: nowrap;
}

.cat-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s;
  white-space: nowrap;
  flex: 0 0 auto;
}

.cat-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.cat-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ===== Main Content ===== */
.main-content {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px 40px;
}

/* ===== News Feed ===== */
.feed {
  display: flex;
  flex-direction: column;
}

.feed-hero {
  margin-bottom: 16px;
  padding-top: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 22px;
}

.feed-hero-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.feed-hero-copy {
  min-width: 0;
}

.feed-hero-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin: 0 0 6px;
  letter-spacing: -0.015em;
  color: var(--text);
}

.feed-hero-subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
}

.feed-hero-meta {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.feed-hero-updated {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-muted);
  font-weight: 600;
}

.feed-status {
  margin: 0 16px 14px;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.feed-section-head {
  margin: 0 16px 14px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.feed-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.feed-section-count {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.editorial-note {
  margin: 0 16px 18px;
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.editorial-note a {
  font-weight: 600;
}

.news-card {
  display: grid;
  grid-template-columns: minmax(280px, 32%) 1fr;
  border-bottom: 1px solid var(--border);
  min-height: 210px;
  transition: background 0.1s;
  overflow: hidden;
}

.news-card:hover {
  background: var(--bg-secondary);
}

.news-card.hidden {
  display: none;
}

.card-image-link {
  display: block;
  overflow: hidden;
  background: var(--bg-secondary);
}

.card-image-shell {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 180px;
}

.card-image-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  margin-top: -12px;
  margin-left: -12px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.15s ease;
}

.card-image-shell.is-loading .card-image-spinner {
  opacity: 1;
}

.card-image {
  width: 100%;
  height: 100%;
  min-height: 180px;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.card-image[src=""],
.card-image:not([src]) {
  visibility: hidden;
}

.news-card:hover .card-image {
  transform: scale(1.04);
}

.card-body {
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.88rem;
}

.category-chip {
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.card-source {
  color: var(--text-muted);
  font-weight: 600;
}

.card-time {
  color: var(--text-muted);
}

.card-why {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.70rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
  margin-top: 2px;
}

.card-title a {
  color: var(--text);
}

.card-title a:hover {
  color: var(--accent);
  text-decoration: none;
}

.card-summary {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;

  /* Clamp to 4 lines */
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  margin-top: 4px;
}

.card-feedback {
  margin-top: auto;
  padding-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--bg-secondary);
}

.feedback-btn {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  min-width: 30px;
  height: 28px;
  padding: 0 8px;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
}

.feedback-btn:hover {
  border-color: var(--accent);
}

.feedback-btn.is-active {
  background: var(--accent-light);
  border-color: var(--accent);
}

.feedback-btn:disabled {
  opacity: 0.72;
  cursor: default;
}

.feedback-btn.feedback-throttled {
  opacity: 0.5;
  border-color: #ff4444;
  animation: throttle-pulse 0.5s ease-in-out;
}

@keyframes throttle-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.feedback-score {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
  min-width: 22px;
  text-align: center;
}

.feedback-total {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.read-more {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
}

.nav-link:focus-visible,
.cat-btn:focus-visible,
.read-more:focus-visible,
.editorial-note a:focus-visible,
.card-title a:focus-visible,
.article-source-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  text-decoration: none;
}

/* ===== Feed Skeleton ===== */
.skeleton-card {
  display: grid;
  grid-template-columns: minmax(280px, 32%) 1fr;
  border-bottom: 1px solid var(--border);
  min-height: 210px;
}

.skeleton-image,
.skeleton-line,
.skeleton-chip,
.skeleton-meta,
.skeleton-summary {
  background: linear-gradient(
    90deg,
    var(--bg-secondary) 0%,
    rgba(255, 255, 255, 0.65) 45%,
    var(--bg-secondary) 100%
  );
  background-size: 220% 100%;
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
}

.skeleton-image {
  min-height: 180px;
}

.skeleton-body {
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skeleton-meta-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.skeleton-chip {
  width: 76px;
  height: 20px;
  border-radius: 999px;
}

.skeleton-meta {
  width: 92px;
  height: 14px;
  border-radius: 4px;
}

.skeleton-line {
  height: 18px;
  width: 86%;
  border-radius: 4px;
}

.skeleton-line.short {
  width: 62%;
}

.skeleton-summary {
  margin-top: 6px;
  height: 48px;
  width: 100%;
  border-radius: 4px;
}

@keyframes skeleton-shimmer {
  from { background-position: 200% 0; }
  to { background-position: -20% 0; }
}

.empty-state {
  padding: 48px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 1rem;
}

.empty-state a {
  margin-left: 8px;
  font-weight: 600;
}

/* ===== Loading & Error States ===== */
.loading-state {
  padding: 48px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.error-state {
  padding: 32px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.error-message {
  margin-bottom: 12px;
}

.error-actions {
  display: flex;
  justify-content: center;
}

.retry-btn {
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.retry-btn:hover {
  filter: brightness(0.95);
}

.retry-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

/* ===== Article Page ===== */
.article-page {
  max-width: 680px;
  margin: 0 auto;
  padding: 24px 0;
}

.back-link {
  display: inline-block;
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 20px;
  transition: color 0.15s;
}

.back-link:hover {
  color: var(--text);
  text-decoration: none;
}

.article-header {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.article-region {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.article-title {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.28;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.article-byline {
  color: var(--text-muted);
  font-size: 0.86rem;
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 20px;
}

.article-source {
  font-weight: 600;
  color: var(--text-muted);
}

.article-image {
  width: 100%;
  border-radius: var(--radius);
  margin-bottom: 22px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article-social-rewrite {
  background: var(--bg-secondary);
  border-left: 3px solid var(--accent);
  padding: 14px 18px;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: 22px;
  color: var(--text);
}

.article-summary h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 700;
}

.article-summary p {
  font-size: 0.97rem;
  line-height: 1.75;
  margin-bottom: 22px;
  color: var(--text);
}

.article-source-link {
  display: inline-block;
  background: var(--accent);
  color: #fff !important;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 24px;
  transition: opacity 0.15s;
}

.article-page .card-feedback {
  margin-bottom: 14px;
}

.article-source-link:hover {
  opacity: 0.88;
  text-decoration: none;
}

.article-hashtags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hashtag {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.77rem;
  color: var(--text-muted);
}

/* ===== Blog Listing ===== */
.blog-listing,
.blog-post {
  max-width: 680px;
  margin: 0 auto;
  padding: 24px 0;
}

.page-header {
  margin-bottom: 32px;
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.page-header p {
  color: var(--text-muted);
  font-size: 1rem;
}

.blog-card {
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.blog-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.38;
}

.blog-card-title a {
  color: var(--text);
}

.blog-card-title a:hover {
  color: var(--accent);
  text-decoration: none;
}

.blog-card-excerpt {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.65;
  margin-bottom: 12px;
}

.blog-read-more {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
}

.reading-time {
  color: var(--text-muted);
}

/* ===== Blog Post ===== */
.blog-post-header {
  margin-bottom: 32px;
}

.blog-post-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 8px 0 14px;
}

.blog-post-title {
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.blog-post-body {
  font-size: 1rem;
  line-height: 1.82;
  color: var(--text);
}

.blog-post-body h1,
.blog-post-body h2,
.blog-post-body h3 {
  margin: 1.6em 0 0.5em;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.blog-post-body h1 { font-size: 1.6rem; }
.blog-post-body h2 { font-size: 1.3rem; }
.blog-post-body h3 { font-size: 1.1rem; }

.blog-post-body p {
  margin-bottom: 1.1em;
}

.blog-post-body ul,
.blog-post-body ol {
  padding-left: 1.5em;
  margin-bottom: 1.1em;
}

.blog-post-body li {
  margin-bottom: 0.35em;
}

.blog-post-body a {
  color: var(--accent);
  text-decoration: underline;
}

.blog-post-body code {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.87em;
  font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
}

.blog-post-body pre {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin-bottom: 1.1em;
}

.blog-post-body pre code {
  border: none;
  padding: 0;
  background: none;
}

.blog-post-body blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 16px;
  color: var(--text-muted);
  margin: 1.2em 0;
  font-style: italic;
}

.blog-post-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2em 0;
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 16px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.footer-links-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex-wrap: wrap;
}

.footer-social {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-social-label {
  color: var(--text);
  font-weight: 700;
}

.footer-social-icon {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.15s;
}

.footer-social-icon svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.footer-social-icon:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-light);
  text-decoration: none;
}

.footer-inner a {
  color: var(--text-muted);
}

.footer-inner a:hover {
  color: var(--accent);
}

.footer-visitor-count {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 10px;
  margin-top: 6px;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  flex-wrap: wrap;
}

.footer-visitor-count strong {
  color: var(--accent);
  font-weight: 700;
  margin-left: 2px;
}

/* ===== Cookie Notice ===== */
.cookie-notice {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 220;
  margin: 0 auto;
  max-width: 960px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--header-bg);
  box-shadow: var(--header-shadow);
}

.cookie-notice p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.cookie-notice button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  border-radius: 16px;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

.cookie-notice button:hover {
  filter: brightness(0.95);
}

/* ===== Back To Top ===== */
.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--header-bg);
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--header-shadow);
  cursor: pointer;
  z-index: 230;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, background 0.15s ease;
}

body.cookie-notice-visible .back-to-top {
  bottom: 96px;
}

.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--bg-secondary);
}

/* ===== Mobile Reels — single-slide engine ===== */
@media (max-width: 640px) {
  html.reel-page body { overflow: hidden; }

  .feed-hero { display: none; }
  .feed-status { display: none; }
  .editorial-note { display: none; }
  .feed-section-head { display: none; }

  .site-header {
    min-height: var(--header-h-mobile);
  }
  .header-inner  {
    height: auto;
    min-height: var(--header-h-mobile);
    padding: 6px 12px 8px;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    align-content: flex-start;
  }
  .logo {
    font-size: 1rem;
    flex: 1 1 auto;
    min-width: 0;
  }
  .main-nav {
    order: 3;
    flex: 0 0 100%;
    gap: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--border);
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .main-nav::-webkit-scrollbar { display: none; }
  .nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 6px 10px;
    font-size: 0.82rem;
    line-height: 1.2;
  }
  .nav-label-full {
    display: none;
  }
  .nav-label-mobile {
    display: inline;
  }
  .theme-toggle {
    order: 2;
    padding: 4px 9px;
    font-size: 0.85rem;
  }

  .header-follow {
    order: 2;
    margin-left: auto;
    gap: 5px;
  }

  .header-follow-label {
    display: none;
  }

  .header-follow-icon {
    width: 24px;
    height: 24px;
  }

  .header-follow-icon svg {
    width: 12px;
    height: 12px;
  }

  .theme-toggle {
    margin-left: 4px;
  }
  .main-content  { padding: 0; max-width: 100%; }
  html.reel-page .site-footer { display: none; }

  .footer-inner {
    padding: 14px 12px;
    gap: 8px;
  }

  .footer-links-row,
  .footer-social {
    gap: 8px;
  }

  .footer-social-icon {
    width: 26px;
    height: 26px;
  }

  .footer-social-icon svg {
    width: 13px;
    height: 13px;
  }

  .category-bar {
    top: var(--header-h-mobile);
  }

  /* ── Fixed container sits below the sticky header + catbar ──
     overflow: hidden — no scrolling, JS controls what's visible */
  .feed {
    position: fixed;
    top: calc(var(--header-h-mobile) + var(--catbar-h));
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 50;
  }

  @media (max-width: 380px) {
    .logo {
      font-size: 0.92rem;
    }
  }

  /* ── One card fills the whole container ── */
  .news-card {
    width: 100%;
    height: 100%;
    min-height: unset;
    display: block;
    position: absolute;
    top: 0; left: 0;
    overflow: hidden;
    background: #000;
    border: none;
  }

  .skeleton-card {
    grid-template-columns: 1fr;
    height: 100%;
    min-height: unset;
    position: absolute;
    inset: 0;
    border: none;
    background: #000;
  }

  .skeleton-image {
    height: 100%;
    min-height: unset;
  }

  .skeleton-body {
    display: none;
  }

  /* Slide-in animation applied by JS when navigating */
  @keyframes reel-slide-in {
    from { opacity: 0; transform: translateY(32px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .news-card.reel-enter {
    animation: reel-slide-in 0.28s ease forwards;
  }

  /* Image fills the card */
  .card-image-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    overflow: hidden;
  }
  .card-image-shell {
    width: 100%;
    height: 100%;
    min-height: unset;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .card-image-shell.is-loading .card-image-spinner {
    opacity: 0.95;
    border-color: rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
  }
  .card-image {
    width: 100%;
    height: 100%;
    min-height: unset;
    object-fit: contain;
    object-position: center center;
    opacity: 0.95;
    transition: none;
  }

  /* Hide all text blocks */
  .card-body { display: none; }

  /* Headline gradient overlay at bottom */
  .news-card::after {
    content: attr(data-title);
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 64px 16px 24px;
    background: linear-gradient(to top, rgba(0,0,0,0.80) 0%, transparent 100%);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.48;
    pointer-events: none;
    z-index: 1;
  }

  .card-feedback-reel {
    position: absolute;
    left: 12px;
    bottom: 72px;
    right: auto;
    top: auto;
    z-index: 3;
    margin-top: 0;
    background: rgba(0, 0, 0, 0.52);
    border-color: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
  }

  .card-feedback-reel .feedback-btn {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
  }

  .card-feedback-reel .feedback-btn.is-active {
    background: rgba(255, 102, 0, 0.38);
    border-color: #ffb284;
  }

  .card-feedback-reel .feedback-score,
  .card-feedback-reel .feedback-total {
    color: #fff;
  }

  /* Progress counter badge (appended to body by JS) */
  .reel-loading-overlay {
    position: absolute;
    inset: 0;
    z-index: 20;
    background: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    animation: reel-overlay-in 0.12s ease forwards;
  }
  .reel-loading-overlay.reel-overlay-hide {
    animation: reel-overlay-out 0.28s ease forwards;
  }
  @keyframes reel-overlay-in {
    from { opacity: 0; }
    to   { opacity: 1; }
  }
  @keyframes reel-overlay-out {
    from { opacity: 1; }
    to   { opacity: 0; }
  }
  .reel-loading-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: #ff6600;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
  }

  .reel-counter {
    position: fixed;
    bottom: 20px; right: 16px;
    background: rgba(0,0,0,0.52);
    color: #fff;
    font-size: 0.75rem; font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    z-index: 200;
    pointer-events: none;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    letter-spacing: 0.03em;
  }

  .cookie-notice {
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 10px 12px;
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-notice button {
    width: 100%;
  }

  .back-to-top {
    right: 12px;
    bottom: 72px;
    width: 46px;
    height: 46px;
    font-size: 1.15rem;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  body.cookie-notice-visible .back-to-top {
    bottom: 132px;
  }

  /* Article / blog: normal reading layout */
  .article-page             { padding: 20px 16px; }
  .article-title            { font-size: 1.45rem; }
  .blog-listing, .blog-post { padding: 20px 16px; }
  .blog-post-title          { font-size: 1.7rem; }
}

@media (max-width: 860px) {
  .feed-hero-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .feed-hero-meta {
    align-items: flex-start;
    text-align: left;
  }
}
