@import url("https://fonts.googleapis.com/css2?family=Merriweather:wght@700;900&family=Source+Sans+3:wght@400;600;700;800&display=swap");

:root {
  --bg: #f0f2f7;
  --fg: #172033;
  --muted: #5b6579;
  --border: #e8ecf2;
  --card: #ffffff;
  --shadow: 0 10px 30px 0 rgba(16, 24, 40, 0.08);
  --header-height: 90px;
  --site-max-width: 720px;
  --accent: #b91c1c;
  --accent2: #dc2626;
  /* category colors */
  --c-hot:       linear-gradient(135deg,#f97316,#ef4444);
  --c-ai:        linear-gradient(135deg,#7c3aed,#a855f7);
  --c-tech:      linear-gradient(135deg,#0891b2,#06b6d4);
  --c-business:  linear-gradient(135deg,#059669,#10b981);
  --c-world:     linear-gradient(135deg,#1d4ed8,#3b82f6);
  --c-lifestyle: linear-gradient(135deg,#db2777,#ec4899);
  --c-default:   linear-gradient(135deg,#475569,#64748b);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--fg);
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  padding-top: var(--header-height);
  background:
    radial-gradient(900px 500px at 10% -5%,  rgba(124,58,237,0.07),  transparent),
    radial-gradient(700px 400px at 90%  0%,  rgba(6,182,212,0.07),   transparent),
    radial-gradient(600px 300px at 50% 100%, rgba(249,115,22,0.05),  transparent),
    #f0f2f7;
}

.header {
  background: #ffffff;
  box-shadow: var(--shadow);
  border-bottom: 1px solid #e5e7eb;
  border-top: 3px solid transparent;
  border-image: linear-gradient(90deg,#7c3aed,#3b82f6,#06b6d4,#10b981,#f97316,#ec4899) 1;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 50;
  transform: translateY(-10px);
  opacity: 0;
  animation: headerIn 420ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.header-inner {
  align-items: center;
  display: flex;
  gap: 14px;
  height: var(--header-height);
  justify-content: space-between;
  margin: 0 auto;
  max-width: var(--site-max-width);
  padding: 0 20px;
  width: 100%;
}

.brand-news {
  font-family: "Merriweather", serif;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg,#7c3aed,#b91c1c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 132px;
  height: 68px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  letter-spacing: 0.02em;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #ffffff;
  font-size: 12px;
}

.search {
  width: 100%;
  max-width: 740px;
  margin: 0;
}

.search input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  background: var(--bg);
  color: var(--fg);
  transition: border-color 0.2s;
}

.search input:focus {
  outline: none;
  border-color: var(--accent);
}

.header-actions {
  display: flex;
  gap: 10px;
}

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #ffffff;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.btn.secondary {
  background: var(--border);
  color: var(--fg);
}

.btn.secondary:hover {
  background: #e5e7eb;
}

.container {
  margin: 0 auto;
  max-width: var(--site-max-width);
  padding: 40px 20px;
  width: 100%;
  position: relative;
}

.newsline {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  margin: 4px 0 18px;
  padding: 10px 14px;
  border: none;
  background: linear-gradient(110deg,#fdf2f8,#fef3c7,#ecfdf5);
  border-left: 4px solid #f97316;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(249,115,22,0.10);
}

.newsline-badge {
  background: linear-gradient(135deg,#f97316,#ef4444);
  color: #fff;
  font-weight: 800;
  font-size: 11px;
  border-radius: 999px;
  padding: 5px 10px;
  box-shadow: 0 2px 8px rgba(249,115,22,0.35);
}

.newsline-text {
  font-weight: 700;
  color: #92400e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.newsline-meta {
  color: #b45309;
  font-size: 12px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 16px;
  margin-bottom: 18px;
}

.featured-card {
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
  min-height: 300px;
  position: relative;
}

.featured-slider {
  position: relative;
}

.featured-slides {
  position: relative;
  min-height: 460px;
}

.featured-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(1.01);
  transition: opacity 920ms ease, transform 920ms ease, visibility 0s linear 920ms;
}

.featured-slide.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: scale(1);
  transition: opacity 920ms ease, transform 920ms ease, visibility 0s;
}

.featured-slide img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
}

.featured-visual.no-image {
  width: 100%;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 900;
  letter-spacing: 0.08em;
  font-size: 34px;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.3);
  background: linear-gradient(135deg, #334155, #0f172a);
}

.featured-visual.no-image.cate-hot { background: linear-gradient(135deg,#f97316,#ef4444); }
.featured-visual.no-image.cate-AI { background: linear-gradient(135deg,#7c3aed,#a855f7); }
.featured-visual.no-image.cate-Technology { background: linear-gradient(135deg,#0891b2,#06b6d4); }
.featured-visual.no-image.cate-Business { background: linear-gradient(135deg,#059669,#10b981); }
.featured-visual.no-image.cate-World { background: linear-gradient(135deg,#1d4ed8,#3b82f6); }
.featured-visual.no-image.cate-Lifestyle { background: linear-gradient(135deg,#db2777,#ec4899); }

.featured-nav {
  position: absolute;
  top: 42%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: none;
  background: rgba(15, 23, 42, 0.56);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 4;
}

.featured-nav.prev {
  left: 12px;
}

.featured-nav.next {
  right: 12px;
}

.featured-dots {
  position: absolute;
  bottom: 12px;
  right: 14px;
  display: flex;
  gap: 6px;
  z-index: 5;
}

.featured-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.58);
  cursor: pointer;
}

.featured-dot.active {
  width: 20px;
  background: #ffffff;
}

.featured-body {
  padding: 16px 18px 18px;
}

.featured-kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg,#f97316,#ef4444);
  color: #fff;
  box-shadow: 0 2px 8px rgba(239,68,68,0.30);
}

.featured-title {
  font-family: "Merriweather", serif;
  font-size: 30px;
  line-height: 1.24;
  margin: 8px 0 10px;
}

.featured-desc {
  color: #475569;
  font-size: 16px;
  line-height: 1.55;
  margin-bottom: 12px;
}

.featured-meta {
  color: #64748b;
  font-size: 13px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.info-rail {
  display: grid;
  gap: 12px;
}

.rail-block {
  border: 1px solid #e2e8f0;
  border-left: 4px solid #7c3aed;
  background: #fff;
  border-radius: 12px;
  padding: 12px 14px;
}

#railActivity {
  border-left-color: #0891b2;
}

.rail-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.rail-block-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
}

.rail-toggle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid #cbd5e1;
  background: #f1f5f9;
  color: #64748b;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.2s, color 0.2s, transform 0.25s;
  flex-shrink: 0;
}

.rail-toggle:hover {
  background: #e2e8f0;
  color: #334155;
}

.rail-toggle.collapsed {
  transform: rotate(0deg);
}

.rail-collapsed {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.3s ease;
}

.rail-expanded {
  max-height: 600px;
  opacity: 1;
  transition: max-height 0.3s ease, opacity 0.3s ease;
}

.rail-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.rail-list li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #334155;
  font-size: 14px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #e2e8f0;
}

.rail-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.rail-link {
  color: #334155;
  text-decoration: none;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.4;
}

.rail-link:hover {
  color: #b91c1c;
}

.rail-time {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
  align-self: flex-start;
  margin-top: 1px;
  flex-shrink: 0;
}

.insight-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.insight-chip {
  border: none;
  border-radius: 10px;
  padding: 8px 10px;
}

.insight-chip:nth-child(1) { background: linear-gradient(135deg,#ede9fe,#ddd6fe); }
.insight-chip:nth-child(2) { background: linear-gradient(135deg,#cffafe,#e0f2fe); }
.insight-chip:nth-child(3) { background: linear-gradient(135deg,#dcfce7,#d1fae5); }
.insight-chip:nth-child(4) { background: linear-gradient(135deg,#fef9c3,#fde68a); }

.insight-label {
  font-size: 11px;
  color: #4c1d95;
  font-weight: 600;
}

.insight-chip:nth-child(2) .insight-label { color: #155e75; }
.insight-chip:nth-child(3) .insight-label { color: #065f46; }
.insight-chip:nth-child(4) .insight-label { color: #78350f; }

.insight-value {
  margin-top: 3px;
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
}

.bg-decor {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.orb {
  position: absolute;
  filter: blur(80px);
  opacity: 0.4;
  border-radius: 50%;
  animation: orbFloat 8s ease-in-out infinite;
}

.o1 {
  width: 200px;
  height: 200px;
  background: var(--accent);
  top: 10%;
  left: 5%;
  animation-delay: 0s;
}

.o2 {
  width: 150px;
  height: 150px;
  background: var(--accent2);
  top: 20%;
  right: 10%;
  animation-delay: 2s;
}

.o3 {
  width: 180px;
  height: 180px;
  background: var(--accent);
  bottom: 20%;
  left: 10%;
  animation-delay: 4s;
}

.o4 {
  width: 120px;
  height: 120px;
  background: var(--accent2);
  bottom: 10%;
  right: 15%;
  animation-delay: 1s;
}

.o5 {
  width: 100px;
  height: 100px;
  background: var(--accent);
  top: 50%;
  left: 50%;
  animation-delay: 3s;
}

.o6 {
  width: 140px;
  height: 140px;
  background: var(--accent2);
  top: 30%;
  left: 40%;
  animation-delay: 5s;
}

@keyframes orbFloat {
  0%, 100% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(10px, -10px);
  }
  50% {
    transform: translate(-5px, 10px);
  }
  75% {
    transform: translate(5px, 5px);
  }
}

.chips {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid #dde3ef;
  background: linear-gradient(135deg,#f8f0ff,#eff6ff,#f0fdf4);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: 0 0 auto;
  padding: 10px 16px;
  border: 1px solid #dde3ef;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.22s;
  background: #ffffff;
  color: #334155;
}

.chip:hover {
  color: #1e1b4b;
  background: #ede9fe;
  border-color: #c4b5fd;
  transform: translateY(-1px);
}

/* per-category chip colors */
.chip[data-cate="hot"].active         { background: linear-gradient(135deg,#f97316,#ef4444); border-color:#f97316; box-shadow:0 8px 18px rgba(249,115,22,.32); }
.chip[data-cate="AI"].active          { background: linear-gradient(135deg,#7c3aed,#a855f7); border-color:#7c3aed; box-shadow:0 8px 18px rgba(124,58,237,.32); }
.chip[data-cate="Technology"].active  { background: linear-gradient(135deg,#0891b2,#06b6d4); border-color:#0891b2; box-shadow:0 8px 18px rgba(8,145,178,.32); }
.chip[data-cate="Business"].active    { background: linear-gradient(135deg,#059669,#10b981); border-color:#059669; box-shadow:0 8px 18px rgba(5,150,105,.32); }
.chip[data-cate="World"].active       { background: linear-gradient(135deg,#1d4ed8,#3b82f6); border-color:#1d4ed8; box-shadow:0 8px 18px rgba(29,78,216,.32); }
.chip[data-cate="Lifestyle"].active   { background: linear-gradient(135deg,#db2777,#ec4899); border-color:#db2777; box-shadow:0 8px 18px rgba(219,39,119,.32); }

.chip.active {
  color: #ffffff;
  background: linear-gradient(135deg,#1d4ed8,#3b82f6);
  border-color: #1d4ed8;
  box-shadow: 0 8px 18px rgba(29,78,216,.28);
  transform: translateY(-1px);
}

.personal-panel {
  margin-bottom: 18px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #dbeafe;
  background: linear-gradient(135deg, #eff6ff, #f0f9ff);
}

.personal-greet {
  font-size: 16px;
  font-weight: 700;
  color: #1e3a8a;
}

.personal-sub {
  margin-top: 4px;
  color: #475569;
  font-size: 13px;
}

.personal-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-btn {
  border: 1px solid #bfdbfe;
  background: #ffffff;
  color: #1d4ed8;
  border-radius: 999px;
  font-size: 12px;
  padding: 7px 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.quick-btn:hover {
  background: #dbeafe;
}

.ad-slot {
  width: 100%;
  min-height: 96px;
  border-radius: 12px;
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 13px;
  margin: 0 0 16px;
  overflow: hidden;
}

.ad-slot.ready {
  border-style: solid;
  background: #ffffff;
  color: transparent;
}

.ad-slot:empty::before {
  content: "Ad slot reserved";
}

.ad-slot ins,
.ad-slot > div {
  width: 100%;
}

.ad-slot-bottom {
  margin-top: 6px;
  margin-bottom: 24px;
}

.section-title {
  font-family: "Merriweather", serif;
  font-size: 34px;
  font-weight: 900;
  margin: 8px 0 18px;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg,#1e1b4b,#1d4ed8,#7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.notice {
  padding: 16px;
  border-radius: 8px;
  background: #fef3c7;
  color: #92400e;
  margin-bottom: 20px;
  min-height: 1em;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 40px;
}

.news-modules {
  display: grid;
  gap: 16px;
}

.news-module {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  padding: 12px;
}

.module-title {
  margin: 2px 2px 10px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #334155;
}

.has-image-module .module-title {
  color: #0f766e;
}

.no-image-module .module-title {
  color: #7c2d12;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.card {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid #eceff4;
  box-shadow: 0 8px 28px rgba(17, 24, 39, 0.08);
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  transform: translateY(10px);
  opacity: 0;
  animation: cardIn 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes cardIn {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.card:hover {
  box-shadow: 0 16px 38px rgba(17, 24, 39, 0.16);
  transform: translateY(-4px);
}

.card-media {
  position: relative;
}

.card-media-no-image {
  background: linear-gradient(135deg, #e2e8f0, #f8fafc);
  border-bottom: 1px solid #e2e8f0;
}

.card-media-fallback {
  width: 100%;
  height: 132px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 900;
  letter-spacing: 0.08em;
  font-size: 24px;
  background: linear-gradient(135deg, #64748b, #334155);
}

.card-media-fallback.cate-hot { background: linear-gradient(135deg,#f97316,#ef4444); }
.card-media-fallback.cate-AI { background: linear-gradient(135deg,#7c3aed,#a855f7); }
.card-media-fallback.cate-Technology { background: linear-gradient(135deg,#0891b2,#06b6d4); }
.card-media-fallback.cate-Business { background: linear-gradient(135deg,#059669,#10b981); }
.card-media-fallback.cate-World { background: linear-gradient(135deg,#1d4ed8,#3b82f6); }
.card-media-fallback.cate-Lifestyle { background: linear-gradient(135deg,#db2777,#ec4899); }

.card img {
  width: 100%;
  height: 132px;
  object-fit: cover;
  background: var(--border);
}

.card-cate-tag {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #ffffff;
  background: linear-gradient(135deg,#475569,#64748b);
  border: 1px solid rgba(255,255,255,0.22);
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.22);
}

.card-cate-tag.cate-hot       { background: linear-gradient(135deg,#f97316,#ef4444); }
.card-cate-tag.cate-AI        { background: linear-gradient(135deg,#7c3aed,#a855f7); }
.card-cate-tag.cate-Technology{ background: linear-gradient(135deg,#0891b2,#06b6d4); }
.card-cate-tag.cate-Business  { background: linear-gradient(135deg,#059669,#10b981); }
.card-cate-tag.cate-World     { background: linear-gradient(135deg,#1d4ed8,#3b82f6); }
.card-cate-tag.cate-Lifestyle { background: linear-gradient(135deg,#db2777,#ec4899); }

.card-body {
  padding: 14px;
}

.card-title {
  font-family: "Merriweather", serif;
  font-weight: 700;
  font-size: 20px;
  line-height: 1.45;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--fg);
}

.card-meta {
  display: flex;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.card-meta span {
  background: #ede9fe;
  color: #5b21b6;
  padding: 3px 9px;
  border-radius: 999px;
  font-weight: 600;
}

.card-no-image .card-title {
  -webkit-line-clamp: 3;
}

.pagination {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 8px 0 30px;
}

.page-btn {
  min-width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid #ddd6fe;
  background: #ffffff;
  color: #5b21b6;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
}

.page-btn:hover:not(:disabled) {
  background: #ede9fe;
  border-color: #a78bfa;
}

.page-btn.active {
  background: linear-gradient(135deg,#7c3aed,#6d28d9);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(124,58,237,0.35);
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.footer {
  text-align: center;
  padding: 30px 0;
  color: var(--muted);
  font-size: 14px;
  border-top: 3px solid transparent;
  border-image: linear-gradient(90deg,#7c3aed,#3b82f6,#06b6d4,#10b981,#f97316,#ec4899) 1;
  margin-top: 40px;
}

.cta-panel {
  margin: 12px 0 22px;
  border-radius: 16px;
  border: none;
  background: linear-gradient(135deg,#1e1b4b 0%,#312e81 30%,#4f46e5 60%,#7c3aed 100%);
  padding: 24px 20px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.cta-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px 300px at 80% 50%,rgba(236,72,153,0.25),transparent);
  pointer-events: none;
}

.cta-title {
  font-family: "Merriweather", serif;
  font-size: 22px;
  font-weight: 900;
  color: #ffffff;
  position: relative;
}

.cta-sub {
  margin-top: 8px;
  color: #c7d2fe;
  font-size: 15px;
  position: relative;
}

.cta-link {
  display: inline-block;
  margin-top: 14px;
  padding: 10px 20px;
  border-radius: 999px;
  color: #4f46e5;
  background: #ffffff;
  font-weight: 800;
  position: relative;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  transition: transform 0.18s, box-shadow 0.18s;
}

.cta-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.22);
}

.footer a {
  color: var(--accent);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 20px;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #0f172a, #334155);
  color: #ffffff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.28);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
  z-index: 80;
}

.back-to-top.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.34);
}

@keyframes headerIn {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 768px), (min-width: 769px) {
  :root {
    --header-height: 78px;
  }

  .header {
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
  }

  .header-inner {
    padding: 0 14px;
    gap: 10px;
  }

  .brand-news {
    font-size: 18px;
  }

  .search {
    max-width: 680px;
    margin: 0;
  }

  .search input {
    height: 44px;
    border-radius: 12px;
    font-size: 16px;
    padding: 10px 14px;
  }

  .container {
    padding: 18px 12px 26px;
  }

  .newsline {
    grid-template-columns: auto 1fr;
    gap: 8px;
  }

  .newsline-meta {
    grid-column: 1 / -1;
    font-size: 11px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .featured-card img {
    height: 220px;
  }

  .featured-visual.no-image {
    height: 220px;
    font-size: 28px;
  }

  .featured-slides {
    min-height: 420px;
  }

  .featured-nav {
    width: 32px;
    height: 32px;
    top: 38%;
  }

  .featured-nav.prev {
    left: 8px;
  }

  .featured-nav.next {
    right: 8px;
  }

  .featured-title {
    font-size: 25px;
  }

  .chips {
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .chips::-webkit-scrollbar {
    display: none;
  }

  .chip {
    flex: 0 0 auto;
    padding: 10px 14px;
    font-size: 14px;
    border-radius: 999px;
  }

  .notice {
    padding: 12px;
    margin-bottom: 14px;
    border-radius: 10px;
    font-size: 14px;
  }

  .personal-panel {
    padding: 12px;
    margin-bottom: 14px;
  }

  .personal-greet {
    font-size: 15px;
  }

  .personal-sub {
    font-size: 12px;
  }

  .quick-btn {
    font-size: 12px;
    padding: 7px 10px;
  }

  .ad-slot {
    min-height: 88px;
    margin-bottom: 14px;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .news-module {
    padding: 10px;
  }

  .module-title {
    font-size: 13px;
  }

  .module-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .card {
    border-radius: 16px;
    border-color: #e6eaf2;
    box-shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
  }

  .card:active {
    transform: translateY(0) scale(0.995);
  }

  .card img {
    height: 210px;
  }

  .card-media-fallback {
    height: 210px;
    font-size: 32px;
  }

  .card-cate-tag {
    left: 9px;
    top: 9px;
    font-size: 11px;
    padding: 4px 9px;
  }

  .card-body {
    padding: 14px 14px 15px;
  }

  .card-title {
    font-size: 18px;
    line-height: 1.4;
    -webkit-line-clamp: 3;
    margin-bottom: 10px;
  }

  .card-meta {
    font-size: 13px;
  }

  .card-meta span {
    padding: 4px 10px;
  }

  .section-title {
    font-size: 28px;
    margin-bottom: 12px;
  }

  .footer {
    margin-top: 20px;
    padding: 20px 0 8px;
    font-size: 12px;
  }

  .back-to-top {
    right: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
    font-size: 20px;
  }

  .pagination {
    margin-bottom: 20px;
  }

  .cta-title {
    font-size: 20px;
  }
}

@media (min-width: 769px) and (max-width: 1199px) {
  .card img {
    height: 260px;
  }
}

@media (min-width: 1200px) {
  .card img {
    height: 270px;
  }
}
