/* NewsKida V3 reader. Tokens and proportions come from the "NewsKida Reader" canvas.
   Everything is scoped under body.v3 so V1 (Tailwind/Flowbite) is never affected. */

:root {
  --accent: #2B5FD9;
  --accent-ink: #2B5FD9;
  --ink: #1C1B22;
  --muted: #5E5B66;
  --line: #E6E2D9;
  --field-line: #CFCBC0;
  --page: #F7F5F0;
  --surface: #FFFFFF;
  --surface-read: #FBFAF7;
  --ph: #ECE9E1;
  --ph-icon: #A8A49A;
  --amber: #F5A524;
  --amber2: #ff9d00;
  --body-ink: #2E2C35;
  --read-ink: #4A4753;
  --chip-on-bg: #1C1B22;
  --chip-on-fg: #FFFFFF;
  --rank-line: #B9B5AA;
  --up: #0B7A3B;
  --down: #B42318;
  --shadow: 0 12px 32px rgba(28, 27, 34, .14);
  --fs: 1;
  --display: 'Baloo Bhai 2', 'Hind Vadodara', sans-serif;
  color-scheme: light;
}

html[data-size="small"] {
  --fs: .9;
}

html[data-size="large"] {
  --fs: 1.2;
}

html[data-theme="dark"] {
  /* A real dark theme: near-black page, raised charcoal cards, visible borders, soft light text. */
  --accent-ink: #8FB0FF;
  --ink: #F2F2F6;
  --muted: #A9A7B6;
  --line: #2E2E3A;
  --field-line: #4A4957;
  --page: #0D0D11;
  --surface: #181820;
  --surface-read: #131319;
  --ph: #24242E;
  --ph-icon: #6E6B7A;
  --body-ink: #DAD8E4;
  --read-ink: #9F9DAE;
  --chip-on-bg: #F2F2F6;
  --chip-on-fg: #0D0D11;
  --rank-line: #5A5866;
  --up: #52D68A;
  --down: #FF8A80;
  --shadow: 0 14px 34px rgba(0, 0, 0, .65);
  color-scheme: dark;
}

html[data-theme="dark"] .v3-card {
  border-color: #33333F;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .4);
}

html[data-theme="dark"] .v3-card.is-read {
  box-shadow: none;
}

html[data-theme="dark"] .v3-header,
html[data-theme="dark"] .v3-rail,
html[data-theme="dark"] .v3-tabbar {
  background: #101015;
}

html[data-theme="dark"] .v3-panel {
  border-color: #2E2E3A;
}

html[data-theme="dark"] .v3-card__media img {
  filter: brightness(.92);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body.v3 {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: 'Hind Vadodara', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  min-height: 100vh;
}

/* Prevent background scroll when a dropdown panel is open */
body.v3.dd-open {
  overflow: hidden;
  touch-action: none;
}

/* Prevent background scroll when the interests (or any modal dialog) is open */
body.v3.dialog-open {
  overflow: hidden;
  touch-action: none;
}

body.v3 a {
  color: inherit;
  text-decoration: none;
}

body.v3 a:hover {
  text-decoration: underline;
}

body.v3 button {
  font-family: inherit;
}

body.v3 :focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

body.v3 img {
  max-width: 100%;
}

body.v3 h1,
body.v3 h2,
body.v3 h3 {
  margin: 0;
}

body.v3 [hidden] {
  display: none !important;
}

.v3-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.v3-skip {
  position: absolute;
  left: 8px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--surface) !important;
}

.v3-skip:focus {
  top: 8px;
}

/* ---------- Header ---------- */
.v3-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 72px;
  padding: 0 32px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.v3-header__spacer {
  flex-grow: 1;
}

.v3-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 232px;
  flex-shrink: 0;
}

.v3-logo:hover {
  text-decoration: none !important;
}

.v3-logo__mark {
  display: block;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 12px;
  object-fit: cover;
  background: #FDF0DC;
}

.v3-logo__tm {
  align-self: flex-start;
  margin: 6px 0 0 -6px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
}

.v3-logo__word {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--ink);
}

.v3-search {
  display: flex;
  align-items: center;
  flex-grow: 1;
  max-width: 560px;
  height: 46px;
  padding: 0 18px;
  border: 1px solid var(--field-line);
  border-radius: 999px;
  background: var(--page);
  color: var(--muted);
}

.v3-search input {
  flex-grow: 1;
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  outline: none;
}

/* One ring only: the pill shows focus, the inner input must not draw its own. */
body.v3 .v3-search input:focus,
body.v3 .v3-search input:focus-visible {
  outline: none;
  box-shadow: none;
}

.v3-search {
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}

.v3-search:focus-within {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent);
  color: var(--accent-ink);
}

.v3-search input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.v3-search input::-webkit-search-cancel-button {
  cursor: pointer;
}

.v3-search__close {
  display: none;
}

.v3-iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.v3-iconbtn--boxed {
  border: 1px solid var(--field-line);
  background: var(--surface);
  width: 44px;
  height: 44px;
}

.v3-iconbtn--search {
  display: none;
}

.v3-iconbtn--theme {
  border: 1px solid var(--field-line);
  width: 46px;
  height: 46px;
  background: var(--surface);
}

html[data-theme="dark"] .v3-theme-moon,
html:not([data-theme="dark"]) .v3-theme-sun {
  display: none;
}

.v3-textsize {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 46px;
  padding: 0 16px;
  border: 1px solid var(--field-line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
}

.v3-textsize span {
  font-size: 15px;
}

.v3-playbadge {
  display: inline-flex;
  flex-shrink: 0;
  line-height: 0;
  border-radius: 8px;
}

.v3-playbadge img {
  display: block;
  height: auto;
  max-height: 100%;
}

/* The badge is black with transparent corners; on a dark page a thin light outline keeps its edge visible. */
html[data-theme="dark"] .v3-playbadge img {
  border-radius: 3.8% / 13.8%;
  box-shadow: 0 0 0 1px #8A8A96;
}

.v3-playbadge:hover {
  text-decoration: none !important;
  filter: brightness(1.08);
}

/* ---------- Shell ---------- */
.v3-shell {
  display: flex;
  align-items: flex-start;
}

.v3-rail {
  position: sticky;
  top: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 96px;
  height: calc(100vh - 72px);
  flex-shrink: 0;
  padding: 12px 0;
  overflow: hidden;
  background: var(--surface);
  border-right: 1px solid var(--line);
}

.v3-rail__spacer {
  flex-grow: 1;
}

.v3-rail__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 82px;
  flex-shrink: 0;
  border-radius: 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  line-height: 1.3;
}

.v3-rail__item:hover {
  background: var(--page);
  text-decoration: none !important;
}

.v3-rail__item.is-active {
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
  color: var(--accent-ink);
  font-weight: 700;
}

.v3-main {
  flex: 1;
  min-width: 0;
  padding: 24px 44px 56px 40px;
}

.v3-flash {
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
  color: var(--ink);
  font-weight: 600;
}

.v3-flash--alert {
  background: color-mix(in srgb, var(--down) 12%, var(--surface));
}

.v3-tabbar,
.v3-nextfab {
  display: none;
}

/* ---------- Feed layout ---------- */
.v3-feed-layout {
  display: grid;
  grid-template-columns: minmax(0, 800px) 340px;
  gap: 40px;
  align-items: start;
}

.v3-feed {
  min-width: 0;
}

/* The story list stays in view while the feed scrolls. It can still be scrolled with the wheel or
   touchpad, but shows no scrollbar. */
.v3-side {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-height: calc(100vh - 112px);
  overflow-y: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.v3-side::-webkit-scrollbar,
.v3-index__list::-webkit-scrollbar {
  display: none;
}

.v3-filters {
  display: flex;
  gap: 10px;
  min-height: 44px;
}

.v3-dd {
  position: relative;
}

.v3-dd__btn {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--field-line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  max-width: 300px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v3-dd__btn::-webkit-details-marker {
  display: none;
}

.v3-dd[open] .v3-dd__btn svg {
  transform: rotate(180deg);
}

.v3-dd__panel {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  width: 280px;
  max-height: 340px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.v3-dd__opts {
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0
}

.v3-dd__opt {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
}

.v3-dd__opt:hover {
  background: var(--page);
}

.v3-dd__opt input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

.v3-dd__apply {
  width: 100%;
  margin-top: 8px;
  flex-shrink: 0;
}

.v3-cats {
  display: flex;
  gap: 8px;
  height: 48px;
  margin-top: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

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

.v3-cats--static {
  height: auto;
  flex-wrap: wrap;
  margin-top: 0;
  overflow: visible;
}

.v3-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 0 18px;
  min-height: 44px;
  border: 1px solid var(--field-line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 17px;
  font-weight: 500;
  white-space: nowrap;
}

.v3-chip:hover {
  text-decoration: none !important;
  border-color: var(--ink);
}

.v3-chip[data-active="true"] {
  background: var(--chip-on-bg);
  border-color: var(--chip-on-bg);
  color: var(--chip-on-fg);
  font-weight: 600;
}

.v3-chip--mine {
  border-style: dashed;
}

.v3-feed-head {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  margin-top: 12px;
}

.v3-feed-head h1 {
  font-size: calc(26px * var(--fs));
  font-weight: 700;
}

.v3-feed-head__date {
  font-size: 17px;
  color: var(--muted);
}

.v3-qchip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
  color: var(--accent-ink);
  font-size: 15px;
  font-weight: 600;
}

.v3-progress-row {
  display: none;
}

.v3-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.v3-pill:hover {
  text-decoration: none !important;
}

.v3-pill--accent {
  background: var(--accent);
  color: #fff;
}

.v3-pill--tint {
  height: 36px;
  padding: 0 14px;
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
  color: var(--accent-ink);
  font-size: 14px;
  font-weight: 700;
}

.v3-searchnote {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin: 4px 0 8px;
  color: var(--muted);
  font-size: 15px;
}

.v3-searchnote__term {
  padding: 2px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
  color: var(--accent-ink);
  font-weight: 600;
}

.v3-searchnote__term_2 {
  padding: 2px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--amber2) 20%, var(--surface));
  color: var(--amber2);
  font-weight: 600;
}

.v3-notice {
  margin: 8px 0 0;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--muted);
  font-size: 15px;
}

body.v3 .v3-notice a {
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.v3-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 8px;
}

/* ---------- Story card ---------- */
.v3-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  scroll-margin-top: 96px;
}

.v3-card.is-read {
  background: var(--surface-read);
}

.v3-card__top {
  display: flex;
  gap: 24px;
}

.v3-card__main {
  flex-grow: 1;
  min-width: 0;
}

.v3-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  color: var(--muted);
  font-size: 15px;
}

.v3-card.is-read .v3-meta__source {
  color: var(--ink);
  font-weight: 600;
}

.v3-meta__time:hover {
  text-decoration: underline;
}

.v3-meta__cat {
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
}

.v3-flag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.v3-flag--new {
  padding: 1px 10px;
  border-radius: 999px;
  background: var(--amber);
  color: #1C1B22;
  font-size: 13px;
  font-weight: 700;
}

.v3-flag--read {
  font-weight: 600;
}

.v3-card__title {
  margin: 6px 0 0 !important;
  font-size: calc(25px * var(--fs));
  font-weight: 700;
  line-height: 1.55;
}

.v3-card.is-read .v3-card__title {
  color: var(--read-ink);
}

.v3-card__media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 168px;
  height: 126px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--ph);
}

.v3-card__ph {
  color: var(--ph-icon);
}

.v3-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.v3-card.is-read .v3-card__media img {
  opacity: .8;
}

.v3-card__body {
  margin: 14px 0 0;
  font-size: calc(18px * var(--fs));
  line-height: 1.9;
  color: var(--body-ink);
}

.v3-card__body strong {
  font-weight: 600;
  color: var(--ink);
}

.v3-card.is-read .v3-card__body {
  color: var(--read-ink);
}

.v3-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.v3-act {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--field-line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.v3-act:hover {
  border-color: var(--ink);
  text-decoration: none !important;
}

.v3-act[aria-pressed="true"] {
  border: 2px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
  color: var(--accent-ink);
}

.v3-act[aria-pressed="true"] svg {
  fill: currentColor;
}

.v3-act--icon {
  width: 44px;
  padding: 0;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--muted);
}

.v3-source {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
}

.v3-source:hover {
  color: var(--ink);
  text-decoration: underline;
}

.v3-ad {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 20px 16px;
  border: 1px dashed var(--field-line);
  border-radius: 20px;
  background: var(--surface);
  min-height: 120px;
}

.v3-ad__label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.v3-pager,
.v3-end {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 28px 0 0;
  text-align: center;
  font-size: 15px;
  color: var(--muted);
}

body.v3 .v3-end a {
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.v3-spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: v3spin .8s linear infinite;
}

@keyframes v3spin {
  to {
    transform: rotate(360deg);
  }
}

.v3-empty {
  margin: 24px 0;
  padding: 40px 24px;
  border: 1px dashed var(--field-line);
  border-radius: 20px;
  background: var(--surface);
  text-align: center;
}

.v3-empty h2 {
  font-size: 22px;
}

.v3-empty p {
  margin: 6px 0 16px;
  color: var(--muted);
}

.v3-empty--dark {
  border-color: #3A3842;
  background: transparent;
  color: #F4F3F7;
}

.v3-bar {
  display: inline-block;
  flex-grow: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--line);
}

.v3-bar__fill {
  display: block;
  width: 0;
  height: 6px;
  border-radius: 3px;
  background: var(--accent);
  transition: width .25s ease;
}

.v3-bar--light {
  background: #3A3842;
}

.v3-bar--light .v3-bar__fill {
  background: #fff;
}

/* ---------- Side panels ---------- */
.v3-panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}

.v3-panel h2 {
  font-size: 20px;
  font-weight: 700;
}

.v3-panel__title {
  font-size: 18px !important;
}

.v3-panel__text {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.v3-panel__note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.v3-panel__more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  color: var(--accent-ink);
  font-size: 15px;
  font-weight: 600;
}

.v3-panel--accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.v3-panel--accent p {
  margin: 4px 0 0;
  font-size: 16px;
}

.v3-panel .v3-btn {
  margin-top: 12px;
  width: 100%;
}

.v3-index {
  padding: 20px 12px 12px;
}

.v3-index__head {
  padding: 0 8px;
}

.v3-index__progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 15px;
}

.v3-index__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: calc(100vh - 430px);
  min-height: 120px;
  margin: 10px 0 0;
  padding: 0;
  overflow-y: auto;
  scrollbar-width: none;
  list-style: none;
}

.v3-index__item {
  display: flex;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 16px;
  line-height: 1.55;
}

.v3-index__item:hover {
  background: var(--page);
  text-decoration: none !important;
}

.v3-index__item[aria-current="true"] {
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
  box-shadow: inset 4px 0 0 var(--accent);
  font-weight: 700;
}

.v3-index__item.is-read {
  color: var(--muted);
}

.v3-index__num {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border: 1.5px solid var(--rank-line);
  border-radius: 50%;
  color: var(--muted);
  font-size: 13px;
}

.v3-index__item[aria-current="true"] .v3-index__num {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.v3-index__item.is-read .v3-index__num {
  border-color: var(--line);
  background: var(--line);
}

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

.v3-index__keys {
  margin: 8px 8px 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.v3-index__keys kbd {
  padding: 1px 8px;
  border: 1px solid var(--field-line);
  border-radius: 6px;
  background: var(--page);
  font: inherit;
  font-size: 14px;
}

.v3-mini-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.v3-mini-list li a {
  display: block;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-size: 16px;
}

.v3-mini-list li:first-child a {
  border-top: 0;
}

.v3-market {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.v3-market__row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.v3-market__row:first-child {
  border-top: 0;
}

.v3-market__label {
  color: var(--muted);
}

.v3-market__value {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.v3-market__delta {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-width: 64px;
  justify-content: flex-end;
  font-size: 13px;
  font-weight: 700;
}

.v3-market__delta.is-up {
  color: var(--up);
}

.v3-market__delta.is-down {
  color: var(--down);
}

.v3-social {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.v3-social__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 15px;
}

.v3-social__link img {
  border-radius: 6px;
}

/* ---------- Buttons ---------- */
.v3-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.v3-btn:hover {
  text-decoration: none !important;
  filter: brightness(1.05);
}

.v3-btn--primary {
  background: var(--accent);
  color: #fff !important;
}

.v3-btn--dark {
  background: var(--chip-on-bg);
  color: var(--chip-on-fg) !important;
}

.v3-btn--white {
  background: #fff;
  color: var(--accent) !important;
  font-size: 17px;
  font-weight: 700;
  height: 48px;
}

.v3-btn--ghost {
  border: 1px solid var(--field-line);
  background: var(--surface);
  color: var(--ink);
}

.v3-btn--quiet {
  background: transparent;
  color: var(--muted);
  height: 48px;
}

.v3-btn--lg {
  height: 56px;
  font-size: 18px;
  font-weight: 700;
  border-radius: 14px;
}

/* ---------- Generic pages ---------- */
.v3-page {
  max-width: 920px;
}

.v3-page--narrow {
  max-width: 720px;
}

.v3-page__head {
  margin-bottom: 20px;
}

.v3-page__head h1 {
  font-size: calc(28px * var(--fs));
  font-weight: 700;
}

.v3-page__head p {
  margin: 4px 0 0;
  color: var(--muted);
}

.v3-single {
  max-width: 800px;
}

.v3-crumbs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 15px;
}

.v3-crumbs a {
  color: var(--accent-ink);
  font-weight: 600;
}

.v3-related {
  margin-top: 32px;
}

.v3-related h2 {
  font-size: 22px;
}

.v3-related ul {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.v3-related li a {
  display: block;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.v3-related__title {
  display: block;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.6;
}

.v3-related__meta {
  color: var(--muted);
  font-size: 14px;
}

.v3-prose {
  font-size: calc(18px * var(--fs));
  line-height: 1.9;
  color: var(--body-ink);
}

body.v3 .v3-prose a {
  color: var(--accent-ink);
  text-decoration: underline;
}

.v3-prose h2,
.v3-prose h3 {
  margin: 20px 0 6px;
  color: var(--ink);
}

.v3-section {
  margin-top: 28px;
}

.v3-section__title {
  font-size: 20px;
  font-weight: 700;
}

.v3-section__title--letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
  color: var(--accent-ink);
}

.v3-cardgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.v3-monthnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.v3-monthnav h2 {
  min-width: 120px;
  text-align: center;
  font-size: 22px;
}

.v3-monthnav .v3-pill {
  white-space: nowrap;
}

.v3-rot-90 {
  transform: rotate(90deg);
}

.v3-rot-270 {
  transform: rotate(-90deg);
}

.v3-cardgrid--events {
  grid-template-columns: minmax(0, 1fr);
}

.v3-eventcard {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.v3-eventcard:hover {
  border-color: var(--ink);
  text-decoration: none !important;
}

.v3-eventcard__media {
  flex: 0 0 360px;
  width: 360px;
  aspect-ratio: 790 / 384;
  border-radius: 14px;
}

/* same shape as the pictures, so nothing is cropped */
.v3-eventcard__body {
  flex-grow: 1;
  min-width: 0;
}

.v3-eventcard__title {
  display: block;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
}

.v3-eventcard__text {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.7;
}

.v3-eventcard__date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
  padding: 5px 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
  color: var(--accent-ink);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.v3-eventcard__date strong {
  font-size: 17px;
}

.v3-letters {
  position: sticky;
  top: 72px;
  z-index: 5;
  display: flex;
  gap: 6px;
  padding: 10px 0;
  overflow-x: auto;
  background: var(--page);
  scrollbar-width: none;
}

.v3-letters a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: 1px solid var(--field-line);
  border-radius: 12px;
  background: var(--surface);
  font-size: 18px;
  font-weight: 600;
}

.v3-person {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.v3-person:hover {
  border-color: var(--ink);
  text-decoration: none !important;
}

.v3-person__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--ph);
  color: var(--muted);
  font-size: 22px;
  font-weight: 700;
}

.v3-person__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.v3-person__name {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
}

.v3-detail h1 {
  font-size: calc(28px * var(--fs));
  line-height: 1.5;
}

.v3-detail__date,
.v3-detail__tags {
  margin: 0 0 4px;
  color: var(--accent-ink);
  font-weight: 600;
}

.v3-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

/* Auto-advancing image carousel (Day Special) */
.v3-carousel {
  position: relative;
  overflow: hidden;
  background: var(--ph);
}

.v3-carousel__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .7s ease;
}

.v3-carousel__slide.is-active {
  opacity: 1;
}

.v3-carousel--hero {
  aspect-ratio: 16 / 9;
  margin: 16px 0;
  border-radius: 18px;
}

.v3-carousel__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  display: flex;
  justify-content: center;
  gap: 4px;
}

.v3-carousel__dot {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
}

.v3-carousel__dot::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .55);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .25);
}

.v3-carousel__dot[aria-current="true"]::after {
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  background: #fff;
}

.v3-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.v3-video__thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 16px;
  background: #000;
  cursor: pointer;
}

.v3-video__thumb img,
.v3-video__thumb iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.v3-video__play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .65);
  color: #fff;
  transform: translate(-50%, -50%);
}

.v3-video__title {
  margin-top: 10px !important;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.55;
}

.v3-video__meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.v3-video__meta a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.v3-menu {
  margin: 0 0 20px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  list-style: none;
}

.v3-menu li+li {
  border-top: 1px solid var(--line);
}

.v3-menu a {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 0 16px;
  font-size: 17px;
  font-weight: 500;
}

.v3-menu a span {
  flex-grow: 1;
}

.v3-menu__chev {
  transform: rotate(-90deg);
  color: var(--muted);
}

.v3-menu--small a {
  min-height: 48px;
  font-size: 15px;
  color: var(--muted);
}

.v3-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.v3-form__row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.v3-form label {
  font-size: 16px;
  font-weight: 600;
}

.v3-form input,
.v3-form select,
.v3-form textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--field-line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}

.v3-form__error {
  margin: 0;
  color: var(--down);
  font-size: 14px;
}

/* ---------- Setup / settings fields ---------- */
.v3-field {
  margin-top: 20px;
}

.v3-field__label {
  font-size: 17px;
  font-weight: 700;
}

.v3-field__hint {
  margin: 2px 0 10px;
  color: var(--muted);
  font-size: 15px;
}

.v3-sizes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.v3-size {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  padding: 0;
  border: 1px solid var(--field-line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.v3-size small {
  font-size: 13px;
}

.v3-size[aria-checked="true"] {
  border: 2px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
  color: var(--accent-ink);
  font-weight: 700;
}

.v3-size-preview {
  margin-top: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  font-size: calc(18px * var(--fs));
  font-weight: 600;
  line-height: 1.6;
}

.v3-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.v3-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--field-line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
}

.v3-toggle svg {
  display: none;
}

.v3-toggle[aria-pressed="true"] {
  border: 2px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
  color: var(--accent-ink);
  font-weight: 700;
}

.v3-toggle[aria-pressed="true"] svg {
  display: block;
}

.v3-more-chips {
  width: 100%;
}

.v3-more-chips summary {
  display: inline-flex;
  list-style: none;
}

.v3-more-chips summary::-webkit-details-marker {
  display: none;
}

.v3-setup {
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 20px 20px;
  display: flex;
  flex-direction: column;
}

.v3-setup__title {
  margin-top: 14px !important;
  font-family: var(--display);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.5;
}

.v3-setup__lead {
  margin: 0;
  color: var(--muted);
}

.v3-setup__actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: auto;
  padding-top: 24px;
}

.v3-setup .v3-logo {
  width: auto;
}

.v3-setup .v3-logo__mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.v3-setup .v3-logo__word {
  font-size: 25px;
}

body.v3-setup-page .v3-header,
body.v3-setup-page .v3-rail,
body.v3-setup-page .v3-tabbar {
  display: none;
}

body.v3-setup-page .v3-main {
  padding: 0;
}


/* ---------- Reels ---------- */
body.v3-reels-page .v3-main {
  padding: 0;
  background: #0E0D12;
}

.v3-reels {
  --reel-h: calc(100vh - 72px);
  --reel-h: calc(100dvh - 72px);
  height: var(--reel-h);
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  overscroll-behavior: contain;
  background: #0E0D12;
  color: #F4F3F7;
}

.v3-reel {
  position: relative;
  display: flex;
  justify-content: center;
  height: var(--reel-h);
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.v3-reel__stage {
  position: relative;
  width: min(100%, 420px);
  height: 100%;
  background: #000;
}

.v3-reel__video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.v3-reel__fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  background: rgba(0, 0, 0, .75);
  text-align: center;
}

.v3-reel__info {
  position: absolute;
  left: calc(50% - min(50%, 210px));
  bottom: 0;
  width: min(100%, 420px);
  padding: 56px 72px 20px 16px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .75));
  pointer-events: none;
}

.v3-reel__info>* {
  pointer-events: auto;
}

.v3-reel__channel {
  font-weight: 700;
}

.v3-reel__time {
  margin-left: 8px;
  color: #C9C7D3;
  font-size: 14px;
}

.v3-reel__caption {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.6;
}

.v3-reel__side {
  position: absolute;
  right: calc(50% - min(50%, 210px) + 8px);
  bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.v3-reel__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  cursor: pointer;
}

.v3-pager--dark,
body.v3-reels-page .v3-end {
  color: #B9B6C4;
  padding: 20px 0;
  margin: 0;
}

/* ---------- Dialog / toast ---------- */
.v3-dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.v3-dialog::backdrop {
  background: rgba(0, 0, 0, .5);
}

.v3-dialog__form {
  padding: 24px;
}

.v3-dialog__title {
  font-size: 22px;
  font-weight: 700;
}

.v3-dialog__lead {
  margin: 4px 0 12px;
  color: var(--muted);
  font-size: 15px;
}

.v3-dialog__fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.v3-radio {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  font-size: 16px;
}

.v3-radio input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

.v3-dialog__note {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  font-size: 15px;
  font-weight: 600;
}

.v3-dialog__note textarea {
  padding: 10px 14px;
  border: 1px solid var(--field-line);
  border-radius: 12px;
  background: var(--page);
  color: var(--ink);
  font: inherit;
}

.v3-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.v3-toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  z-index: 90;
  max-width: calc(100vw - 32px);
  padding: 12px 20px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--surface);
  font-size: 15px;
  font-weight: 600;
  transform: translateX(-50%);
  box-shadow: var(--shadow);
}

/* ---------- Medium screens: rail + single column ---------- */
@media (max-width: 1179px) {
  .v3-feed-layout {
    grid-template-columns: minmax(0, 800px);
  }

  .v3-side {
    display: none;
  }

  .v3-main {
    padding: 24px 32px 56px;
  }

  /* Without the right rail, progress and the 5-minute shortcut move above the list. */
  .v3-progress-row {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 52px;
    padding: 0 4px;
  }

  .v3-progress-row__text {
    color: var(--muted);
    font-size: 14px;
  }

  .v3-progress-row .v3-bar {
    flex-grow: 0;
    width: 88px;
  }
}

/* ---------- Mobile (matches the 390px canvas) ---------- */
@media (max-width: 759px) {
  .v3-header {
    gap: 0;
    height: 60px;
    padding: 0 4px 0 16px;
  }

  .v3-logo {
    width: auto;
    gap: 8px;
  }

  .v3-logo__mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .v3-logo__word {
    font-size: 25px;
  }

  .v3-header .v3-playbadge {
    display: none;
  }

  .v3-iconbtn--search {
    display: inline-flex;
  }

  .v3-iconbtn--theme {
    width: 48px;
    height: 48px;
    border: 0;
    background: transparent;
  }

  .v3-textsize {
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .v3-search {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 5;
    max-width: none;
    height: 60px;
    padding: 0 8px 0 16px;
    border: 0;
    border-radius: 0;
    background: var(--surface);
  }

  body.v3.is-search-open .v3-search {
    display: flex;
  }

  .v3-search:focus-within {
    box-shadow: none;
    border: 0;
  }

  .v3-search__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    color: var(--ink);
  }

  .v3-rail {
    display: none;
  }

  .v3-shell {
    display: block;
  }

  .v3-main {
    padding: 0 12px 96px;
  }

  .v3-page,
  .v3-single,
  .v3-detail {
    padding-top: 16px;
  }

  .v3-filters {
    min-height: 44px;
    margin: 8px 0 0;
  }

  .v3-dd__btn {
    height: 40px;
    padding: 0 12px;
    font-size: 14px;
    max-width: 46vw;
  }

  .v3-dd__panel {
    position: fixed;
    left: 12px;
    right: 12px;
    top: auto;
    /* bottom: 76px; */
    width: auto;
    max-height: 55vh;
  }

  .v3-cats {
    height: 56px;
    margin: 0 -12px;
    padding: 6px 16px;
    align-items: center;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
  }

  .v3-chip {
    padding: 0 18px;
    font-size: 16px;
  }

  .v3-cats--static {
    height: auto;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    overflow: visible;
    background: transparent;
    border: 0;
  }

  .v3-feed-head {
    min-height: 0;
    margin: 0;
  }

  .v3-feed-head h1,
  .v3-feed-head__date {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .v3-progress-row {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 52px;
    padding: 0 4px;
  }

  .v3-progress-row__text {
    color: var(--muted);
    font-size: 14px;
    white-space: nowrap;
  }

  .v3-progress-row .v3-bar {
    flex-grow: 0;
    width: 88px;
  }

  .v3-progress-row .v3-bi__en {
    display: none;
  }

  .v3-list {
    gap: 12px;
    margin-top: 0;
  }

  .v3-card {
    padding: 0;
    overflow: hidden;
    border-radius: 18px;
  }

  .v3-card__top {
    flex-direction: column-reverse;
    gap: 0;
  }

  .v3-card__media {
    width: 100%;
    height: 150px;
    border-radius: 0;
  }

  .v3-card__main {
    padding: 12px 16px 0;
  }

  .v3-meta {
    font-size: 14px;
  }

  .v3-card__title {
    font-size: calc(22px * var(--fs));
  }

  .v3-card__body {
    margin: 8px 0 0;
    padding: 0 16px;
    font-size: calc(17px * var(--fs));
    line-height: 1.9;
  }

  .v3-card__actions {
    margin: 4px 0 0;
    padding: 0 8px 8px;
    gap: 4px;
  }

  /* Icons only on phones: save and WhatsApp sit on the card itself. */
  .v3-act {
    width: 46px;
    min-height: 46px;
    padding: 0;
    justify-content: center;
    border-color: transparent;
  }

  .v3-act__label {
    display: none;
  }

  .v3-card__actions .v3-source {
    flex-basis: 100%;
    min-height: 40px;
    padding: 0 8px;
  }

  .v3-ad {
    border-radius: 18px;
  }

  .v3-nextfab {
    position: fixed;
    right: 16px;
    bottom: 80px;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    box-shadow: var(--shadow);
    cursor: pointer;
  }

  .v3-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: flex;
    height: 64px;
    background: var(--surface);
    border-top: 1px solid var(--line);
  }

  .v3-tabbar__item {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
  }

  .v3-tabbar__item .v3-bi--stack .v3-bi__en {
    font-size: 10px;
  }

  .v3-tabbar__item.is-active {
    color: var(--accent-ink);
    font-weight: 700;
  }

  .v3-tabbar__item:hover {
    text-decoration: none !important;
  }

  .v3-toast {
    bottom: 84px;
  }

  .v3-card {
    scroll-margin-top: 72px;
  }

  .v3-reels {
    --reel-h: calc(100vh - 60px - 64px);
    --reel-h: calc(100dvh - 60px - 64px);
  }

  .v3-reel__stage {
    width: 100%;
  }

  .v3-reel__info {
    left: 0;
    width: 100%;
  }

  .v3-reel__side {
    right: 8px;
  }

  .v3-letters {
    top: 60px;
  }

  .v3-cardgrid,
  .v3-video-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  body.v3-reels-page .v3-toast {
    bottom: 84px;
  }

  .v3-page__head h1 {
    font-size: calc(24px * var(--fs));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .v3-spinner {
    animation: none;
  }

  .v3-bar__fill {
    transition: none;
  }
}

/* ---------- Bilingual labels: "ગુજરાતી (English)" ---------- */
.v3-bi__en {
  color: var(--muted);
  font-weight: 500;
  font-size: .88em;
}

.v3-bi--stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.25;
  text-align: center;
}

.v3-bi--stack .v3-bi__en {
  display: block;
  font-size: 10.5px;
  font-weight: 500;
}

.v3-panel--accent .v3-bi__en,
.v3-btn--primary .v3-bi__en,
.v3-btn--white .v3-bi__en,
.v3-btn--dark .v3-bi__en,
.v3-pill--accent .v3-bi__en,
.v3-actionbar__next .v3-bi__en {
  color: inherit;
  opacity: .85;
}

.v3-chip[data-active="true"] .v3-bi__en {
  color: inherit;
  opacity: .85;
}

.v3-rail__item.is-active .v3-bi__en,
.v3-tabbar__item.is-active .v3-bi__en {
  color: inherit;
  opacity: .85;
}

/* Eight tabs must fit without scrolling: item height follows the window height. */
.v3-rail__item {
  height: clamp(60px, calc((100vh - 72px - 24px - 28px) / 8), 78px);
}

.v3-rail__label {
  display: block;
  max-width: 100%;
  padding: 0 2px;
  font-size: 12.5px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.v3-tabbar__label {
  font-size: 12px;
  line-height: 1.25;
}

/* Tablet widths: the 232px logo column and 24px gaps push the header past the screen edge. */
@media (min-width: 760px) and (max-width: 1099px) {
  .v3-header {
    gap: 12px;
    padding: 0 20px;
  }

  .v3-logo {
    width: auto;
  }

  .v3-search {
    min-width: 0;
  }

  .v3-header .v3-playbadge img {
    height: 36px;
    width: auto;
  }
}

/* Links that leave the site are always underlined so they read as links. */
.v3-source {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Header: interests icon (desktop / large screens only) ---------- */
.v3-iconbtn--interests {
  border: 1px solid var(--field-line);
  width: 46px;
  height: 46px;
  background: var(--surface);
  color: var(--accent-ink);
}

@media (max-width: 759px) {
  .v3-iconbtn--interests {
    display: none;
  }
}

/* ---------- Interests pop-up ---------- */
.v3-dialog--wide {
  width: min(720px, calc(100vw - 24px));
  max-height: calc(100dvh - 32px);
  overflow: hidden;
}

.v3-interests {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 32px);
}

.v3-interests__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.v3-interests__body {
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 4px;
  overflow-y: auto;
}

.v3-interests__actions {
  flex-shrink: 0;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.v3-interestnote {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin: 8px 0px;
  color: var(--muted);
  font-size: 15px;
}

.v3-linkbtn {
  padding: 0 4px;
  min-height: 36px;
  border: 0;
  background: transparent;
  color: var(--accent-ink);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.v3-menu__btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 56px;
  padding: 0 16px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 17px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.v3-menu__btn span {
  flex-grow: 1;
}

/* ---------- Story list note, today's special ---------- */
.v3-index__note {
  margin: 8px 8px 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.v3-panel--special {
  border-color: color-mix(in srgb, var(--amber) 55%, var(--line));
  background: color-mix(in srgb, var(--amber) 9%, var(--surface));
}

.v3-panel--special .v3-panel__title {
  display: flex;
  align-items: center;
  gap: 6px;
}

.v3-todaybanner {
  display: none;
  align-items: center;
  gap: 10px;
  margin: 10px 0px;
  padding: 10px 14px;
  border: 1px solid color-mix(in srgb, var(--amber) 55%, var(--line));
  border-radius: 14px;
  background: color-mix(in srgb, var(--amber) 12%, var(--surface));
  font-size: 15px;
}

.v3-todaybanner:hover {
  text-decoration: none !important;
}

.v3-todaybanner__text {
  flex: 1;
  min-width: 0;
}

.v3-todaybanner__label {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 1179px) {
  .v3-todaybanner {
    display: flex;
  }
}

/* ---------- Preference fields ---------- */
.v3-field__hint {
  margin: 2px 0 6px;
}

.v3-interests .v3-field:first-child {
  margin-top: 8px;
}

.v3-interests .v3-chips {
  max-height: none;
}


/* ---------- Reels: one shared player ---------- */
.v3-reel__stage {
  overflow: hidden;
}

.v3-reel__video,
.v3-reel__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.v3-reel__video {
  object-fit: contain;
  background: #000;
}

.v3-reel__poster {
  object-fit: contain;
}

.v3-reel.is-playing .v3-reel__poster {
  opacity: 0;
  transition: opacity .2s;
}

.v3-reel__btn--nav {
  display: none;
}

@media (min-width: 760px) {
  .v3-reel__btn--nav {
    display: flex;
  }
}

/* ---------- Stock Market ticker for screens without the right rail ---------- */
.v3-marketstrip {
  display: none;
  align-items: center;
  gap: 14px;
  margin: 0 0 10px;
  padding: 8px 14px;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  font-size: 14px;
}

.v3-marketstrip::-webkit-scrollbar {
  display: none;
}

.v3-marketstrip__title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-weight: 700;
}

.v3-marketstrip__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.v3-marketstrip__label {
  color: var(--muted);
}

.v3-marketstrip .is-up {
  display: inline-flex;
  align-items: center;
  color: var(--up);
  font-weight: 700;
}

.v3-marketstrip .is-down {
  display: inline-flex;
  align-items: center;
  color: var(--down);
  font-weight: 700;
}

@media (max-width: 1179px) {
  .v3-marketstrip {
    display: flex;
  }
}

/* ---------- Source logos ---------- */
.v3-avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: var(--sz, 28px);
  height: var(--sz, 28px);
  overflow: hidden;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
  color: var(--accent-ink);
  font-size: calc(var(--sz, 28px) * .46);
  font-weight: 700;
  line-height: 1;
}

.v3-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
}

.v3-card.is-read .v3-avatar {
  filter: grayscale(1);
  opacity: .75;
}

.v3-dd__opt .v3-avatar {
  margin-right: -4px;
}

.v3-reel__channel {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.v3-reel__channel .v3-avatar {
  border: 1.5px solid rgba(255, 255, 255, .7);
  background: #26252E;
  color: #fff;
}

/* ---------- Story page ---------- */
.v3-card__hero {
  margin: 0 0 14px;
  overflow: hidden;
  border-radius: 18px;
  background: var(--ph);
}

.v3-card__hero img {
  display: block;
  width: 100%;
  max-height: 460px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.v3-card--single .v3-card__title {
  font-size: calc(30px * var(--fs));
  line-height: 1.5;
}

/* ---------- App card / Google Play badge ---------- */
.v3-panel .v3-playbadge {
  margin-top: 14px;
}

.v3-appcard--wide {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin-top: 24px;
}

.v3-appcard--wide .v3-playbadge {
  margin-top: 0;
}

/* ---------- About / Contact / Privacy / Terms buttons ---------- */
.v3-linkgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0 8px;
}

.v3-linkbtn-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}

.v3-linkbtn-card:hover {
  border-color: var(--accent);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 16%, transparent);
  text-decoration: none !important;
  transform: translateY(-1px);
}

.v3-linkbtn-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  color: var(--accent-ink);
}

.v3-linkbtn-card__label {
  flex-grow: 1;
}

.v3-linkbtn-card__chev {
  transform: rotate(-90deg);
  color: var(--muted);
}

@media (max-width: 520px) {
  .v3-linkgrid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 759px) {
  .v3-eventcard {
    flex-direction: column;
    align-items: stretch;
  }

  .v3-eventcard__media {
    flex: none;
    width: 100%;
  }

  .v3-eventcard__date {
    align-self: flex-end;
    margin-left: 0;
  }

  .v3-eventpage__head {
    flex-direction: column;
    gap: 8px;
  }

  .v3-card--single .v3-card__title {
    font-size: calc(24px * var(--fs));
  }
}

.v3-more-badge {
  margin: 0 0 20px;
}

/* Day Special page: title left, date right, one wide carousel (same shape as the main site). */
.v3-eventpage {
  max-width: 920px;
}

.v3-eventpage__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 4px 0 14px;
}

.v3-eventpage__head h1 {
  margin: 0;
}

.v3-eventpage__head .v3-eventcard__date {
  margin-top: 6px;
  font-size: 15px;
}

.v3-carousel--wide {
  aspect-ratio: 790 / 384;
  margin: 0 0 22px;
  border-radius: 18px;
}

.v3-carousel__arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .38);
  color: #fff;
  cursor: pointer;
}

.v3-carousel__arrow:hover {
  background: rgba(0, 0, 0, .6);
}

.v3-carousel__arrow--prev {
  left: 12px;
}

.v3-carousel__arrow--next {
  right: 12px;
}


/* A letter section stops below the sticky header (72px) and the sticky letter bar (~64px) when jumped to. */
.v3-section--letter {
  scroll-margin-top: 150px;
}

@media (max-width: 759px) {
  .v3-section--letter {
    scroll-margin-top: 132px;
  }
}
