:root {
  --red: #b91c1c;
  --red-dark: #7f1d1d;
  --red-mid: #991b1b;
  --bg: #f3f4f6;
  --card: #ffffff;
  --text: #18181b;
  --muted: #71717a;
  --line: #e4e4e7;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Noto Sans Devanagari", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.app {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100dvh;
  background: var(--bg);
  position: relative;
  box-shadow: 0 0 0 1px var(--line);
}

.topbar {
  background: #09090b;
  color: #d4d4d8;
  font-size: 11px;
  padding: 6px 12px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.topbar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.header {
  background: var(--red);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 40;
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.logo {
  width: 40px; height: 40px;
  background: #fff; color: var(--red);
  border-radius: 10px;
  display: grid; place-items: center;
  font-weight: 800; font-size: 18px;
}
.brand h1 { margin: 0; font-size: 20px; line-height: 1; }
.brand p { margin: 3px 0 0; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: #fecaca; }

.header-actions { display: flex; gap: 6px; align-items: center; }
.install-btn, .notify-btn {
  background: #fff; color: var(--red);
  border: 0; border-radius: 999px;
  font-weight: 700; font-size: 12px;
  padding: 6px 10px;
}
.install-btn { display: none; }
.install-btn.show { display: inline-block; }
.notify-btn.on { background: #14532d; color: #fff; }
.sbtn.bell { background: #b45309; width: 100%; margin-bottom: 8px; }

.cats {
  background: var(--red-mid);
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cats::-webkit-scrollbar { display: none; }
.cat-btn {
  flex: 0 0 auto;
  background: none; border: 0;
  color: rgba(255,255,255,.72);
  font: inherit; font-weight: 700; font-size: 14px;
  padding: 10px 12px;
  border-bottom: 2px solid transparent;
}
.cat-btn.active { color: #fff; border-bottom-color: #fff; }

.breaking {
  background: #18181b; color: #fff;
  display: flex; align-items: stretch;
}
.breaking-tag {
  background: #dc2626;
  font-size: 11px; font-weight: 800;
  padding: 8px 10px; flex-shrink: 0;
}
.ticker { overflow: hidden; flex: 1; padding: 8px 0; font-size: 13px; }
.ticker-track {
  display: inline-block; white-space: nowrap;
  animation: ticker 28s linear infinite;
  padding-left: 100%;
}
@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

.main { padding: 10px 10px 88px; }

.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 6px 2px 8px;
}
.section-head h2 { margin: 0; font-size: 16px; }
.badge {
  font-size: 11px; font-weight: 700;
  color: #047857; background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 999px; padding: 2px 8px;
}

.news-list { display: flex; flex-direction: column; gap: 10px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.card-hit { display: block; color: inherit; text-decoration: none; }

.hero .hero-img {
  width: 100%; height: 188px;
  object-fit: cover; display: block; background: var(--red-dark);
}
.hero-body { padding: 10px 12px 12px; }
.pill {
  display: inline-block;
  background: var(--red); color: #fff;
  font-size: 10px; font-weight: 800;
  border-radius: 6px; padding: 2px 7px;
}
.hero-body h2 {
  margin: 6px 0 4px; font-size: 18px; line-height: 1.35;
}
.hero-body p { margin: 0; color: #3f3f46; font-size: 13px; line-height: 1.45; }
.meta { margin-top: 8px; font-size: 11px; color: var(--muted); }

.row {
  display: grid;
  grid-template-columns: 1fr 108px;
  gap: 10px;
  padding: 10px;
  align-items: start;
}
.row h3 { margin: 4px 0; font-size: 15px; line-height: 1.35; }
.row p { margin: 0; font-size: 12px; color: #52525b; line-height: 1.4; }
.thumb {
  width: 108px; height: 86px;
  object-fit: cover; border-radius: 10px;
  background: #e4e4e7;
}

.clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.empty { text-align: center; color: var(--muted); padding: 40px 10px; }

.dock {
  position: fixed;
  left: 50%; transform: translateX(-50%);
  bottom: 0; width: 100%; max-width: 430px;
  background: #fff;
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding-bottom: var(--safe-bottom);
  z-index: 40;
}
.dock a, .dock button {
  background: none; border: 0;
  font: inherit; font-size: 11px; font-weight: 700;
  color: #71717a;
  padding: 8px 0 6px;
  text-decoration: none;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.dock .on { color: var(--red); }
.dock span.ic { font-size: 18px; line-height: 1; }

.sheet {
  position: fixed; inset: 0; z-index: 50;
  display: none;
}
.sheet.open { display: block; }
.sheet-bg { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.sheet-card {
  position: absolute; inset: 0;
  max-width: 430px; margin: 0 auto;
  background: #fff;
  display: flex; flex-direction: column;
}
.sheet-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: #fff;
}
.sheet-top button {
  width: 36px; height: 36px; border: 0; border-radius: 999px;
  background: #f4f4f5; font-size: 16px;
}
.sheet-body { padding: 12px 14px 28px; overflow: auto; flex: 1; }
.sheet-body img {
  width: 100%; height: 190px; object-fit: cover;
  border-radius: 12px; margin-bottom: 10px; background: #e4e4e7;
}
.sheet-body h2 { margin: 4px 0 10px; font-size: 22px; line-height: 1.3; }
.sheet-body p { margin: 0 0 12px; line-height: 1.7; font-size: 16px; }
.video-box {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  margin-bottom: 10px;
}
.video-box iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%; border: 0;
}
.news-video {
  width: 100%;
  border-radius: 12px;
  background: #000;
  margin-bottom: 10px;
  max-height: 240px;
}

.sub-box { padding: 14px; margin-top: 12px; }
.sub-box h3 { margin: 0 0 4px; font-size: 16px; }
.sub-box p { margin: 0 0 10px; font-size: 13px; color: #52525b; }
.share-row { display: flex; flex-wrap: wrap; gap: 8px; }
.sbtn {
  border: 0; border-radius: 10px;
  padding: 8px 10px; font-weight: 800; font-size: 12px;
  color: #fff; text-decoration: none; cursor: pointer;
}
.sbtn.wa { background: #16a34a; }
.sbtn.fb { background: #1d4ed8; }
.sbtn.ig { background: #db2777; }
.sbtn.x { background: #18181b; }
.sbtn.copy { background: #57534e; }
.article-share { margin-top: 14px; }
.alert-form { display: flex; gap: 8px; margin-top: 10px; }
.alert-form input {
  flex: 1; border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 10px; font: inherit;
}
.alert-form button {
  background: var(--red); color: #fff; border: 0;
  border-radius: 10px; font-weight: 800; padding: 8px 10px;
}
.hint { font-size: 12px; color: #047857; min-height: 1em; }

@media (min-width: 800px) {
  .app { max-width: 430px; min-height: 100dvh; }
}
