:root {
  --bg: #f7f7f7;
  --paper: #ffffff;
  --card: #ffffff;
  --ink: #101010;
  --muted: #5d5d5d;
  --line: rgba(16, 16, 16, 0.14);
  --accent: #d61f1f;
  --accent-2: #111111;
  --shadow: 0 22px 56px rgba(0, 0, 0, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(214, 31, 31, 0.12), transparent 30%),
    radial-gradient(circle at bottom right, rgba(17, 17, 17, 0.06), transparent 28%),
    linear-gradient(180deg, #fafafa 0%, #f0f0f0 100%);
  color: var(--ink);
  font-family: "Noto Sans Devanagari", "Segoe UI", sans-serif;
}

button,
a {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  min-height: 100vh;
  padding: 14px;
  display: flex;
  justify-content: center;
}

.app {
  width: min(100%, 500px);
  min-height: calc(100vh - 28px);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 28px;
  background: var(--paper);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #d61f1f 0%, #7f1111 100%);
  color: #fff;
  border-bottom: 3px solid #111;
}

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

.brand__mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #fff 0%, #f4f4f4 100%);
  color: #d61f1f;
  font-family: "Archivo Black", sans-serif;
  font-size: 1.2rem;
  font-weight: 900;
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.22);
}

.brand__copy {
  min-width: 0;
}

.brand__name {
  font-family: "Archivo Black", "Noto Sans Devanagari", sans-serif;
  font-size: 1.72rem;
  line-height: 1.05;
  letter-spacing: -0.05em;
  font-weight: 900;
}

.location-chip {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 46px;
  padding: 10px 14px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff 0%, #f4f4f4 100%);
  color: #121212;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
  font-size: 0.95rem;
  font-weight: 800;
}

.location-chip__pin {
  width: 9px;
  height: 9px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: #d61f1f;
  position: relative;
  flex: none;
}

.location-chip__pin::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: #fff;
}

.content {
  flex: 1;
  padding: 14px;
}

.hero {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at top right, rgba(214, 31, 31, 0.14), transparent 26%),
    linear-gradient(180deg, #fff 0%, #fffef8 100%);
  box-shadow: 0 14px 28px rgba(16, 16, 16, 0.08);
}

.hero__title {
  margin: 0;
  font-family: "Archivo Black", "Noto Sans Devanagari", sans-serif;
  font-size: 1.45rem;
  line-height: 1.14;
  letter-spacing: -0.03em;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
}

.hero__badge--accent {
  background: linear-gradient(135deg, var(--accent) 0%, #111 100%);
  color: #fff;
}

.section {
  margin-top: 14px;
}

.section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.section__title {
  font-size: 1.02rem;
  font-weight: 900;
}

.section__link {
  border: 0;
  background: transparent;
  color: #d61f1f;
  font-size: 0.9rem;
  font-weight: 800;
}

.feed {
  display: grid;
  gap: 12px;
}

.section__empty {
  padding: 14px 16px;
  border: 1px dashed rgba(17, 17, 17, 0.14);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff 0%, #fafafa 100%);
  color: #5e5e5e;
  font-weight: 700;
  line-height: 1.5;
}

.story-card {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(16, 16, 16, 0.06);
  text-align: left;
}

.story-card__image {
  height: 100%;
  min-height: 108px;
  border-radius: 16px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.24), transparent 28%),
    linear-gradient(135deg, #d61f1f 0%, #111 100%);
  overflow: hidden;
  position: relative;
}

.story-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #111;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.14);
}

.story-card__image::after {
  content: "";
  position: absolute;
  inset: auto 12px 12px auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.story-card__body {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 4px;
}

.story-card__title {
  font-size: 1.02rem;
  line-height: 1.3;
  font-weight: 900;
  margin: 0;
}

.story-card__summary {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.story-card__meta {
  font-size: 0.72rem;
  color: #7b7b7b;
  font-weight: 700;
}

.story-card--featured {
  grid-template-columns: 1fr;
}

.story-card--featured .story-card__image {
  min-height: 190px;
}

.story-card--featured .story-card__title {
  font-size: 1.18rem;
}

.story-card--ad {
  border-color: rgba(214, 31, 31, 0.22);
  background: linear-gradient(180deg, #fffaf0 0%, #ffffff 100%);
}

.story-card--ad .story-card__image {
  min-height: 132px;
  background:
    linear-gradient(135deg, rgba(255, 214, 0, 0.92), rgba(255, 214, 0, 0.72)),
    linear-gradient(135deg, #111 0%, #111 100%);
}

.story-card--ad .story-card__badge {
  background: #111;
  color: #ffd500;
}

.story-card:active {
  transform: translateY(1px);
}

.detail {
  display: grid;
  gap: 14px;
}

.detail__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-weight: 800;
}

.detail__panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 14px 28px rgba(16, 16, 16, 0.06);
}

.detail__image {
  min-height: 240px;
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.2), transparent 24%),
    linear-gradient(135deg, #d61f1f 0%, #111 100%);
}

.detail__title {
  margin: 0;
  font-size: 1.4rem;
  line-height: 1.28;
  font-family: "Archivo Black", "Noto Sans Devanagari", sans-serif;
  letter-spacing: -0.03em;
}

.detail__meta {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.detail__body {
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.75;
}

.detail__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.detail__button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(16, 16, 16, 0.14);
  border-radius: 999px;
  background: #fff;
  color: #111;
  font-weight: 800;
}

.empty {
  padding: 16px;
  border-radius: 20px;
  border: 1px dashed rgba(16, 16, 16, 0.18);
  background: #fff;
  color: var(--muted);
  text-align: center;
  font-weight: 700;
}

.footer {
  padding: 0 14px 14px;
}

.footer__note {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  color: #6a6a6a;
  text-align: center;
  font-size: 0.8rem;
}

@media (max-width: 420px) {
  .story-card {
    grid-template-columns: 104px minmax(0, 1fr);
  }
}

@media (min-width: 540px) {
  .shell {
    padding: 20px;
  }

  .app {
    min-height: calc(100vh - 40px);
  }
}
