/* Market Recap — modern editorial feed + bottom-sheet article */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,550;9..144,700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --mr-bg: #07080b;
  --mr-elev: #12141a;
  --mr-sheet: #000;
  --mr-sheet-ink: #f3f4f6;
  --mr-sheet-muted: #9aa3af;
  --mr-ink: #f3f4f6;
  --mr-muted: #9aa3af;
  --mr-line: rgba(255, 255, 255, 0.08);
  --mr-gold: #ffd45a;
  --mr-accent: #5b8cff;
  --mr-radius: 22px;
  --mr-shell: 720px;
}

body.history-page {
  background:
    radial-gradient(900px 420px at 10% -8%, rgba(255, 212, 90, 0.08), transparent 55%),
    radial-gradient(700px 380px at 100% 0%, rgba(91, 140, 255, 0.07), transparent 50%),
    var(--mr-bg);
  color: var(--mr-ink);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  min-height: 100vh;
}

body.history-page--article,
body.history-page--reader {
  background: #000;
}

/* Immersive article reader — beat sidebar mobile padding-top (header is hidden) */
html body.history-page--reader,
html body.history-page.history-page--reader,
html body.history-page--reader.no-mobile-header,
html body.history-page.history-page--reader.no-mobile-header {
  --mobile-bottom-nav-total: 0px !important;
  --mobile-header-h: 0px !important;
  --mobile-header-row1-h: 0px !important;
  padding-bottom: 0 !important;
  padding-top: 0 !important;
}

html body.history-page--reader .mr-article-page {
  min-height: 100vh;
  min-height: 100dvh;
}

/* Mobile: full-bleed reader, hide app chrome (sidebar is a drawer here) */
@media (max-width: 991.98px) {
  html body.history-page--reader,
  html body.history-page.history-page--reader {
    padding-left: 0 !important;
  }

  html body.history-page--reader .sidebar,
  html body.history-page--reader .sidebar-container,
  html body.history-page--reader .mobile-bottom-nav,
  html body.history-page--reader .mobile-header,
  html body.history-page--reader .mobile-header-spacer,
  html body.history-page--reader .sidebar-overlay,
  html body.history-page--reader .marketing-top-nav-bar,
  html body.history-page--reader header.marketing-top-nav,
  html body.history-page--reader .le-marketing-top-nav,
  html body.history-page--reader .dash-admin-header {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

.mr-shell {
  width: 100%;
  max-width: var(--mr-shell);
  margin: 0 auto;
  padding: 18px 16px 80px;
  box-sizing: border-box;
}

.mr-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 14px;
}

.mr-section-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.mr-section-link {
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--mr-gold);
  text-decoration: none;
}

.mr-section-link:hover {
  text-decoration: underline;
}

/* —— Featured / Hottest rail —— */
.mr-hot {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 2px 2px 14px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.mr-hot::-webkit-scrollbar {
  display: none;
}

.mr-hot-card {
  --mr-hot-a: #ffd400;
  --mr-hot-b: #b8ff1a;
  --mr-hot-c: #ff5a1f;
  --mr-hot-d: #fff36b;
  --mr-hot-e: #ff9f0a;
  flex: 0 0 min(86vw, 340px);
  scroll-snap-align: start;
  color: inherit;
  text-decoration: none;
  transition: transform 0.25s ease;
}

.mr-hot-card:hover {
  transform: translateY(-2px);
}

.mr-hot-card:hover .mr-hot-card__media {
  border-color: rgba(255, 212, 0, 0.28);
}

.mr-hot-card--gold {
  --mr-hot-a: #ffd400;
  --mr-hot-b: #b8ff1a;
  --mr-hot-c: #ff5a1f;
  --mr-hot-d: #fff36b;
  --mr-hot-e: #ff9f0a;
}

.mr-hot-card--session {
  --mr-hot-a: #00f0ff;
  --mr-hot-b: #4d9fff;
  --mr-hot-c: #b347ff;
  --mr-hot-d: #00ffa8;
  --mr-hot-e: #3dbaff;
}

.mr-hot-card--outlook {
  --mr-hot-a: #ff4d1a;
  --mr-hot-b: #ffd400;
  --mr-hot-c: #ff3d8a;
  --mr-hot-d: #ff9f40;
  --mr-hot-e: #ff6a00;
}

.mr-hot-card--analysis {
  --mr-hot-a: #00ffa8;
  --mr-hot-b: #b8ff1a;
  --mr-hot-c: #1affd5;
  --mr-hot-d: #39ff87;
  --mr-hot-e: #00e5ff;
}

.mr-hot-card--chart {
  --mr-hot-a: #7a6bff;
  --mr-hot-b: #00f0ff;
  --mr-hot-c: #ff4db8;
  --mr-hot-d: #6ec1ff;
  --mr-hot-e: #4d9fff;
}

.mr-hot-card__media {
  position: relative;
  aspect-ratio: 16 / 11;
  border-radius: 24px;
  overflow: hidden;
  isolation: isolate;
  background: #000;
  border: 1px solid rgba(255, 212, 0, 0.12);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.38);
  transition: border-color 0.22s ease;
}

.mr-hot-card__media::before {
  content: '';
  position: absolute;
  left: -18%;
  right: -18%;
  top: -35%;
  height: 88%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 44% 50% at 14% 28%, var(--mr-hot-a) 0%, transparent 70%),
    radial-gradient(ellipse 40% 46% at 86% 16%, var(--mr-hot-c) 0%, transparent 68%),
    radial-gradient(ellipse 36% 42% at 52% 40%, var(--mr-hot-b) 0%, transparent 66%),
    radial-gradient(ellipse 30% 36% at 28% 58%, var(--mr-hot-d) 0%, transparent 70%),
    radial-gradient(ellipse 28% 34% at 74% 54%, var(--mr-hot-e) 0%, transparent 72%);
  filter: blur(24px) saturate(1.7) brightness(1.15);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 36%, rgba(0, 0, 0, 0.55) 62%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 36%, rgba(0, 0, 0, 0.55) 62%, transparent 100%);
}

.mr-hot-card__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.05) 0%,
    rgba(0, 0, 0, 0.18) 34%,
    rgba(0, 0, 0, 0.62) 58%,
    rgba(0, 0, 0, 0.92) 82%,
    #000 100%
  );
  pointer-events: none;
  z-index: 1;
}

.mr-hot-card__content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 16px 16px 18px;
}

.mr-chip {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  width: max-content;
  max-width: 100%;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
  background: none;
  color: #ffd45a;
  box-shadow: none;
}

.mr-hot-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 650;
  color: rgba(255, 255, 255, 0.82);
}

.mr-hot-card__trend {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #fdba74;
}

.mr-hot-card__title {
  margin: 0;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.28;
  color: #fff;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* —— Explore categories —— */
.mr-explore {
  margin: 6px 0 18px;
}

.mr-cats {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 4px;
  scrollbar-width: none;
}

.mr-cats::-webkit-scrollbar {
  display: none;
}

.mr-cat {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--mr-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.mr-cat:hover,
.mr-cat.is-active {
  border-color: rgba(255, 212, 90, 0.45);
  color: var(--mr-gold);
  background: rgba(255, 212, 90, 0.08);
}

/* —— Vertical article cards (image top / text below) —— */
.mr-feed {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: stretch;
}

.mr-card {
  --mr-card-a: #ff4d1a;
  --mr-card-b: #c8ff3d;
  --mr-card-c: #8b5cff;
  --mr-card-d: #00f0ff;
  --mr-card-e: #ff4db8;
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 280px;
  min-width: min(100%, 260px);
  max-width: 100%;
  width: 100%;
  min-height: 188px;
  color: inherit;
  text-decoration: none;
  padding: 12px 14px 14px;
  border-radius: 18px;
  overflow: hidden;
  isolation: isolate;
  background: #000;
  border: 1px solid rgba(255, 212, 0, 0.12);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
  transition: border-color 0.22s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

/* Soft mesh at top only — no hard bottom clip */
.mr-card::before {
  content: '';
  position: absolute;
  left: -20%;
  right: -20%;
  top: -28%;
  height: 72%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 42% 48% at 12% 30%, var(--mr-card-a) 0%, transparent 70%),
    radial-gradient(ellipse 38% 44% at 86% 18%, var(--mr-card-c) 0%, transparent 68%),
    radial-gradient(ellipse 34% 40% at 54% 42%, var(--mr-card-b) 0%, transparent 66%),
    radial-gradient(ellipse 30% 36% at 30% 58%, var(--mr-card-d) 0%, transparent 70%),
    radial-gradient(ellipse 28% 34% at 74% 52%, var(--mr-card-e) 0%, transparent 72%);
  filter: blur(24px) saturate(1.75) brightness(1.18);
  opacity: 1;
  -webkit-mask-image: linear-gradient(
    180deg,
    #000 0%,
    #000 28%,
    rgba(0, 0, 0, 0.72) 48%,
    rgba(0, 0, 0, 0.35) 68%,
    transparent 100%
  );
  mask-image: linear-gradient(
    180deg,
    #000 0%,
    #000 28%,
    rgba(0, 0, 0, 0.72) 48%,
    rgba(0, 0, 0, 0.35) 68%,
    transparent 100%
  );
}

.mr-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.08) 22%,
    rgba(0, 0, 0, 0.28) 40%,
    rgba(0, 0, 0, 0.58) 56%,
    rgba(0, 0, 0, 0.86) 72%,
    #000 88%,
    #000 100%
  );
}

.mr-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 212, 0, 0.28);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.42);
}

.mr-card--gold {
  --mr-card-a: #ffd400;
  --mr-card-b: #b8ff1a;
  --mr-card-c: #ff5a1f;
  --mr-card-d: #fff36b;
  --mr-card-e: #ff9f0a;
}

.mr-card--session {
  --mr-card-a: #00f0ff;
  --mr-card-b: #4d9fff;
  --mr-card-c: #b347ff;
  --mr-card-d: #00ffa8;
  --mr-card-e: #3dbaff;
}

.mr-card--outlook {
  --mr-card-a: #ff4d1a;
  --mr-card-b: #ffd400;
  --mr-card-c: #ff3d8a;
  --mr-card-d: #ff9f40;
  --mr-card-e: #ff6a00;
}

.mr-card--analysis {
  --mr-card-a: #00ffa8;
  --mr-card-b: #b8ff1a;
  --mr-card-c: #1affd5;
  --mr-card-d: #39ff87;
  --mr-card-e: #00e5ff;
}

.mr-card--chart {
  --mr-card-a: #7a6bff;
  --mr-card-b: #00f0ff;
  --mr-card-c: #ff4db8;
  --mr-card-d: #6ec1ff;
  --mr-card-e: #4d9fff;
}

.mr-card__stage {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  height: 48px;
}

.mr-card__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  margin-top: auto;
  padding-top: 4px;
}

.mr-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.62);
}

.mr-card__title {
  margin: 0 0 12px;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.3;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mr-card__more {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.48);
  text-decoration: none;
}

@supports not (background: color-mix(in srgb, white 50%, black)) {
  .mr-card::before {
    background:
      radial-gradient(70% 85% at 18% 8%, var(--mr-card-a), transparent 68%),
      radial-gradient(58% 70% at 78% 0%, var(--mr-card-b), transparent 62%),
      linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, transparent 100%);
    opacity: 0.72;
  }
}

.mr-empty {
  padding: 48px 12px;
  text-align: center;
  color: var(--mr-muted);
}

.mr-empty i {
  display: block;
  margin-bottom: 10px;
  font-size: 1.8rem;
  color: rgba(255, 212, 90, 0.5);
}

/* —— Article: news-detail hero + dark expanding sheet (ref layout) —— */
/* Zero-height sticky shell so the bar overlays the hero with no top gap */
.mr-reader-header {
  position: sticky;
  top: 0;
  z-index: 80;
  width: 100%;
  height: 0;
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
}

.mr-reader-header__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  min-height: 56px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.22s ease, border-color 0.22s ease, backdrop-filter 0.22s ease, box-shadow 0.22s ease;
}

.mr-reader-header.is-scrolled .mr-reader-header__bar {
  background: rgba(8, 9, 12, 0.96);
  border-bottom-color: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.mr-reader-header__title {
  flex: 1;
  min-width: 0;
  font-size: 0.92rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.mr-reader-header.is-scrolled .mr-reader-header__title {
  opacity: 1;
  transform: translateY(0);
}

.mr-reader-header__actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex: 0 0 auto;
}

.mr-article-page {
  position: relative;
  width: 100%;
  max-width: var(--mr-shell, 720px);
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  box-sizing: border-box;
}

.mr-hero {
  position: sticky;
  top: 0;
  z-index: 1;
  height: min(54vh, 440px);
  overflow: hidden;
  isolation: isolate;
}

.mr-hero__img {
  position: absolute;
  left: 0;
  right: 0;
  top: -12%;
  width: 100%;
  height: 124%;
  object-fit: cover;
  will-change: transform;
  transform: translate3d(0, 0, 0) scale(1.02);
}

.mr-hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.28) 0%, rgba(0, 0, 0, 0.08) 36%, rgba(0, 0, 0, 0.55) 72%, rgba(0, 0, 0, 0.78) 100%);
  z-index: 1;
  will-change: opacity;
}

.mr-hero__copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 56px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 0 22px 8px;
  text-align: left;
  will-change: opacity, transform;
}

.mr-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  background: #2f6bff;
  color: #fff;
  box-shadow: 0 6px 16px rgba(47, 107, 255, 0.35);
}

.mr-hero__title {
  margin: 0;
  max-width: 100%;
  font-size: clamp(1.35rem, 4.4vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.18;
  color: #fff;
  text-align: left;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
  /* Prefer ~2 lines at reader width instead of a narrow 3-line stack */
  text-wrap: pretty;
}

.mr-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  text-align: left;
}

.mr-icon-btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 18, 24, 0.42);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  flex: 0 0 auto;
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
  padding: 0;
}

.mr-icon-btn:hover {
  background: rgba(15, 18, 24, 0.58);
  color: #fff;
}

.mr-reader-header.is-scrolled .mr-icon-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.mr-sheet {
  position: relative;
  z-index: 2;
  margin-top: -36px;
  background: #000;
  color: #f3f4f6;
  border-radius: 32px 32px 0 0;
  padding: 12px 22px 64px;
  min-height: 64vh;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 -18px 40px rgba(0, 0, 0, 0.45);
  animation: mr-sheet-in 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.mr-sheet__handle {
  width: 42px;
  height: 4px;
  margin: 2px auto 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

@keyframes mr-sheet-in {
  from {
    transform: translateY(28px);
    opacity: 0.6;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.mr-publisher {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
}

.mr-publisher__logo {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  object-fit: cover;
  background: #000;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.mr-publisher__meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.mr-publisher__name {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.mr-publisher__verified {
  font-size: 1rem;
  color: #2f6bff;
  line-height: 1;
}

.mr-sheet__body {
  font-size: 1.02rem;
  line-height: 1.72;
  color: #d1d5db;
  white-space: pre-wrap;
  text-align: left;
  font-weight: 450;
  margin: 0;
}

.mr-sheet__figures {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 28px;
}

.mr-sheet__figure {
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.mr-sheet__figure button {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: zoom-in;
}

.mr-sheet__figure img {
  display: block;
  width: 100%;
  height: auto;
}

.mr-sheet__cap {
  padding: 8px 12px;
  font-size: 0.75rem;
  color: #9aa3af;
}

/* —— Viewer —— */
.history-viewer {
  position: fixed;
  inset: 0;
  z-index: 2400;
  display: none;
}

.history-viewer.is-open {
  display: block;
}

.history-viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
}

.history-viewer-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.history-viewer-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.history-viewer-close,
.history-viewer-zoom-btn,
.history-viewer-nav {
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.history-viewer-close {
  width: 38px;
  height: 38px;
}

.history-viewer-counter {
  flex: 1;
  text-align: center;
  font-size: 0.84rem;
  color: #d1d5db;
  font-weight: 600;
}

.history-viewer-zoom {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.history-viewer-zoom-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
}

.history-viewer-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.history-viewer-canvas {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  touch-action: none;
  cursor: grab;
}

.history-viewer-img {
  max-width: min(96vw, 1200px);
  max-height: 78vh;
  transform-origin: center center;
  user-select: none;
  -webkit-user-drag: none;
}

.history-viewer-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  z-index: 2;
}

.history-viewer-prev { left: 12px; }
.history-viewer-next { right: 12px; }

.history-viewer-nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.history-viewer-hint {
  text-align: center;
  padding: 10px;
  font-size: 0.75rem;
  color: #9aa3af;
}

@media (min-width: 768px) {
  .mr-shell {
    padding-top: 28px;
  }

  .mr-hot-card {
    flex-basis: 360px;
  }

  .mr-feed {
    gap: 18px;
  }

  .mr-card {
    flex: 1 1 300px;
    min-width: 280px;
    max-width: 380px;
  }

  .mr-hero__copy {
    bottom: 52px;
    padding-left: 28px;
    padding-right: 28px;
  }

  .mr-sheet {
    border-radius: 28px 28px 0 0;
    margin: -40px 16px 40px;
    padding-left: 28px;
    padding-right: 28px;
  }

  .mr-reader-header__bar {
    padding-left: 28px;
    padding-right: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mr-hot-card,
  .mr-card,
  .mr-sheet {
    transition: none;
    animation: none;
  }

  .mr-hero__img,
  .mr-hero__copy,
  .mr-hero__shade {
    transform: none !important;
  }
}

