/* PRO: the gates (pro-ui.js) and the #pro page (pro-page.js); Khác's PRO chip and avatar ring are in app.css.
   Colours are the app's PRO set, already tokens here: --sn-pro (AppTokens.pro), the streak
   container cream and --md-warning ink of the mobile PRO card, chip and paywall. */

/* ---------- Gates ----------
   The mobile paywall's night + gold look (FixedColors.kt Paywall*): a night gradient card, Mầm in
   the crown on a gold glow, gold primary action, glass secondary surfaces. Compact gates (tool
   panels) stay light: a cream card with a gold lock tile, like the app's PRO sheet. */
.pro-gate,
.pro-page {
  --pg-night-top: #04241f;
  --pg-night-mid: #063a33;
  --pg-night-bottom: #0a4a42;
  --pg-gold: #f5c46b;
  --pg-gold-light: #ffd88a;
  --pg-gold-deep: #f2ae3d;
  --pg-on-gold: #2a1700;
  --pg-ink: #eaf4f1;
  --pg-ink-muted: #b7cec8;
  --pg-chip-ink: #f3e6cc;
  --pg-glass: #ffffff0f;
  --pg-glass-strong: #ffffff24;
  --pg-glass-border: #ffffff29;
  --pg-gold-border: #f5c46b47;
}
.pro-gate {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: 880px;
  margin: 28px auto;
  overflow: hidden;
  isolation: isolate;
  border-radius: 28px;
  background:
    radial-gradient(circle at 88% -10%, #f5c46b24, transparent 42%),
    linear-gradient(180deg, var(--pg-night-top) 0%, var(--pg-night-mid) 46%, var(--pg-night-bottom) 100%);
  box-shadow: 0 24px 60px #04241f38, 0 2px 6px #04241f26;
  color: var(--pg-ink);
  font-family: var(--font-app);
  text-align: center;
}
.pro-gate :focus-visible {
  outline: 3px solid var(--pg-gold);
  outline-offset: 2px;
}
.pro-gate-art {
  position: relative;
  display: grid;
  place-items: center;
  padding: 32px 24px 4px;
}
.pro-gate-art::before {
  content: "";
  position: absolute;
  width: 230px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #f5c46b8c 0%, #f5c46b33 38%, #f5c46b00 70%);
}
.pro-gate-mam {
  position: relative;
  width: 148px;
}
.pro-gate-body {
  display: grid;
  justify-items: center;
  gap: 12px;
  min-width: 0;
  padding: 8px 28px 28px;
}
.pro-gate-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--pg-gold);
  font: 700 12px/16px var(--font-app-bold);
  letter-spacing: 1.4px;
  text-transform: uppercase;
}
.pro-gate-eyebrow svg {
  width: 18px;
  height: 18px;
}
.pro-gate-title {
  margin: 0;
  color: var(--pg-ink);
  font: 700 30px/36px var(--font-app-bold);
}
.pro-gate-text {
  max-width: 520px;
  margin: 0;
  color: var(--pg-ink-muted);
  font-size: 16px;
  line-height: 24px;
  overflow-wrap: anywhere;
}
.pro-gate-text strong {
  color: var(--pg-ink);
  font-weight: 700;
}
.pro-gate-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 560px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}
.pro-gate-chips li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 10px;
  border: 1px solid var(--pg-gold-border);
  border-radius: 999px;
  background: var(--pg-glass);
  color: var(--pg-chip-ink);
  font: 600 13px/18px var(--font-app);
}
.pro-gate-chips svg {
  width: 15px;
  height: 15px;
  color: var(--pg-gold);
}
.pro-gate-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 520px;
  margin: 2px 0 0;
  padding: 10px 14px;
  border: 1px solid var(--pg-glass-border);
  border-radius: 14px;
  background: var(--pg-glass);
  color: var(--pg-ink-muted);
  font-size: 14px;
  line-height: 20px;
  text-align: left;
}
.pro-gate-note svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  color: var(--pg-gold);
}
.pro-gate-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}
/* The store badges (two lines: "Nâng cấp trên" + the store) and the gate's pill buttons. */
.pro-gate .pro-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.pro-gate .pro-cta {
  gap: 8px;
  min-height: 52px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  font: 700 15px/20px var(--font-app-bold);
}
.pro-gate .pro-cta svg {
  width: 20px;
  height: 20px;
}
.pro-gate .pro-cta.is-gold {
  background: linear-gradient(180deg, var(--pg-gold-light), var(--pg-gold-deep));
  color: var(--pg-on-gold);
  box-shadow: 0 8px 22px #f2ae3d3d, inset 0 1px 0 #ffffff80;
}
.pro-gate .pro-cta.is-glass {
  border: 1px solid var(--pg-glass-border);
  background: var(--pg-glass);
  color: var(--pg-ink);
}
.pro-gate .pro-cta.is-gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px #f2ae3d59, inset 0 1px 0 #ffffff80;
}
.pro-gate .pro-cta.is-glass:hover {
  background: var(--pg-glass-strong);
}
.pro-gate .pro-cta:disabled {
  cursor: progress;
  opacity: 0.7;
  transform: none;
}
.pro-gate-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2px;
  font-size: 14px;
}
.pro-gate-asked {
  margin-right: 2px;
  color: var(--pg-ink-muted);
}
.pro-gate-dot {
  color: var(--pg-ink-muted);
  opacity: 0.6;
}
.pro-gate .pro-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--pg-gold);
  font: 700 14px/20px var(--font-app);
  text-decoration: none;
  cursor: pointer;
}
.pro-gate .pro-link:hover {
  background: var(--pg-glass);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pro-gate-stores {
  max-width: 520px;
  margin: 0;
  color: var(--pg-ink-muted);
  font-size: 13px;
  line-height: 20px;
}
.pro-gate-stores a {
  color: var(--pg-gold);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pro-gate-hint {
  max-width: 520px;
  color: var(--pg-ink-muted);
  font-size: 13px;
  line-height: 19px;
}
.pro-gate-hint summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--pg-ink-muted);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.pro-gate-hint summary::-webkit-details-marker {
  display: none;
}
.pro-gate-hint summary::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: -3px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}
.pro-gate-hint[open] summary::after {
  margin-top: 3px;
  transform: rotate(225deg);
}
.pro-gate-hint summary:hover {
  background: var(--pg-glass);
  color: var(--pg-ink);
}
.pro-gate-hint p {
  margin: 4px 0 0;
  padding: 0 12px;
}
.pro-gate-feedback {
  margin: 0;
  color: var(--pg-ink);
  font-size: 14px;
  line-height: 20px;
}
.pro-gate-feedback:empty {
  display: none;
}
/* Polar's four prices: glass tiles, the year on gold (#pro picks it first). Two per row in a
   narrow gate, four once there is room. */
.pro-gate-prices {
  container-type: inline-size;
  justify-self: stretch;
  width: 100%;
  max-width: 520px;
  margin: 6px auto 0;
}
.pro-gate-prices ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@container (min-width: 400px) {
  .pro-gate-prices ul {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.pro-gate-prices li {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 12px 4px 10px;
  border: 1px solid var(--pg-glass-border);
  border-radius: 14px;
  background: var(--pg-glass);
}
.pro-gate-plan {
  color: var(--pg-ink-muted);
  font: 600 12.5px/17px var(--font-app);
}
.pro-gate-prices li strong {
  color: var(--pg-ink);
  font: 700 16px/22px var(--font-app-bold);
  white-space: nowrap;
}
.pro-gate-prices li.is-best {
  border-color: var(--pg-gold);
  background: #f5c46b1f;
}
.pro-gate-prices li.is-best strong {
  color: var(--pg-gold-light);
}
.pro-gate-save {
  position: absolute;
  top: -10px;
  left: 50%;
  translate: -50% 0;
  padding: 0 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--pg-gold-light), var(--pg-gold-deep));
  color: var(--pg-on-gold);
  font: 700 10px/18px var(--font-app-bold);
  white-space: nowrap;
}
.pro-gate-prices p {
  margin: 10px 0 0;
  color: var(--pg-ink-muted);
  font-size: 13px;
  line-height: 18px;
  text-align: center;
}
.pro-gate-prices p strong {
  color: var(--pg-gold-light);
}
.pro-gate[aria-busy="true"] .pro-gate-title::after {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: 10px;
  border: 2px solid var(--pg-glass-border);
  border-top-color: var(--pg-gold);
  border-radius: 50%;
  vertical-align: 1px;
}
@media (prefers-reduced-motion: no-preference) {
  .pro-gate[aria-busy="true"] .pro-gate-title::after {
    animation: pro-spin 0.9s linear infinite;
  }
  @keyframes pro-spin {
    to {
      transform: rotate(360deg);
    }
  }
}
@media (prefers-reduced-motion: reduce) {
  .pro-gate .pro-cta {
    transition: none;
  }
  .pro-gate .pro-cta.is-gold:hover {
    transform: none;
  }
}

/* Wide screens: Mầm in a glowing column beside the offer, text left-aligned (web layout). */
@media (min-width: 760px) {
  .pro-gate:not(.is-compact):not(.is-dialog) {
    grid-template-columns: 300px minmax(0, 1fr);
    align-items: center;
    margin: 40px auto;
    text-align: left;
  }
  .pro-gate:not(.is-compact):not(.is-dialog) .pro-gate-art {
    align-self: stretch;
    padding: 36px 24px;
  }
  .pro-gate:not(.is-compact):not(.is-dialog) .pro-gate-art::before {
    width: 280px;
  }
  .pro-gate:not(.is-compact):not(.is-dialog) .pro-gate-mam {
    width: 196px;
  }
  .pro-gate:not(.is-compact):not(.is-dialog) .pro-gate-body {
    justify-items: start;
    padding: 40px 44px 36px 4px;
  }
  .pro-gate:not(.is-compact):not(.is-dialog) .pro-gate-chips,
  .pro-gate:not(.is-compact):not(.is-dialog) .pro-gate-actions,
  .pro-gate:not(.is-compact):not(.is-dialog) .pro-gate-links {
    justify-content: flex-start;
  }
  .pro-gate:not(.is-compact):not(.is-dialog) .pro-gate-prices {
    margin-left: 0;
  }
  .pro-gate:not(.is-compact):not(.is-dialog) .pro-gate-prices p {
    text-align: left;
  }
  /* Pull a row back by the first link's own padding so its text lines up with the copy. */
  .pro-gate:not(.is-compact):not(.is-dialog) .pro-gate-links:has(> .pro-link:first-child),
  .pro-gate:not(.is-compact):not(.is-dialog) .pro-gate-hint {
    margin-left: -12px;
  }
}
@media (max-width: 620px) {
  .pro-gate {
    margin: 16px auto;
    border-radius: 24px;
  }
  .pro-gate-mam {
    width: 124px;
  }
  .pro-gate-art::before {
    width: 196px;
  }
  .pro-gate-body {
    padding: 4px 18px 22px;
  }
  .pro-gate-title {
    font-size: 26px;
    line-height: 32px;
  }
  .pro-gate-text {
    font-size: 15px;
    line-height: 22px;
  }
  .pro-gate-actions {
    justify-self: stretch;
  }
  .pro-gate .pro-cta {
    flex: 1 1 100%;
  }
  .pro-gate-chips li {
    padding: 5px 10px 5px 8px;
    font-size: 12px;
  }
}

/* Compact: a light card for tool panels and banners (mobile NoteUnlockPanel / PRO sheet). */
.pro-gate.is-compact {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  max-width: none;
  margin: 0;
  padding: 16px;
  overflow: visible;
  border: 1px solid #f5c46b73;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff6e4, #ffefd3);
  box-shadow: none;
  color: var(--pg-on-gold);
  text-align: left;
}
.pro-gate.is-compact :focus-visible {
  outline-color: #8a4b00;
}
.pro-gate-lock {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--pg-gold-light), var(--pg-gold-deep));
  box-shadow: 0 4px 12px #f2ae3d40, inset 0 1px 0 #ffffff80;
  color: var(--pg-on-gold);
}
.pro-gate-lock svg {
  width: 22px;
  height: 22px;
}
.pro-gate-mam.is-small {
  width: 64px;
}
.pro-gate.is-compact .pro-gate-body {
  justify-items: start;
  gap: 8px;
  padding: 0;
}
.pro-gate.is-compact .pro-gate-title {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--pg-on-gold);
  font-size: 17px;
  line-height: 22px;
}
.pro-gate-badge {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--pg-on-gold);
  color: var(--pg-gold-light);
  font: 700 10px/14px var(--font-app-bold);
  letter-spacing: 0.8px;
}
.pro-gate.is-compact .pro-gate-text,
.pro-gate.is-compact .pro-gate-note,
.pro-gate.is-compact .pro-gate-stores,
.pro-gate.is-compact .pro-gate-hint {
  max-width: none;
  color: #5a4220;
  font-size: 13px;
  line-height: 19px;
}
.pro-gate.is-compact .pro-gate-text strong {
  color: var(--pg-on-gold);
}
.pro-gate.is-compact .pro-gate-note {
  padding: 8px 12px;
  border-color: #f5c46b59;
  background: #ffffffa6;
}
.pro-gate.is-compact .pro-gate-note svg {
  color: #b86e00;
}
.pro-gate.is-compact .pro-gate-actions {
  justify-content: flex-start;
  gap: 8px;
  margin-top: 2px;
}
.pro-gate.is-compact .pro-cta.is-glass {
  border-color: #f5c46b80;
  background: #ffffffcc;
  color: var(--pg-on-gold);
}
.pro-gate.is-compact .pro-cta.is-glass:hover {
  background: #fff;
}
.pro-gate.is-compact .pro-cta {
  min-height: 44px;
  padding: 0 18px;
  font-size: 14px;
}
.pro-gate.is-compact .pro-gate-links {
  justify-content: flex-start;
}
.pro-gate.is-compact .pro-gate-links:has(> .pro-link:first-child) {
  margin-left: -12px;
}
.pro-gate.is-compact .pro-gate-asked {
  color: #6b5537;
}
.pro-gate.is-compact .pro-link,
.pro-gate.is-compact .pro-gate-stores a {
  color: #8a4b00;
}
.pro-gate.is-compact .pro-link:hover {
  background: #f5c46b2e;
}
.pro-gate.is-compact .pro-gate-feedback {
  color: var(--pg-on-gold);
}
.pro-gate.is-compact[aria-busy="true"] .pro-gate-title::after {
  border-color: #f5c46b66;
  border-top-color: #b86e00;
}
.journal-pro-slot:not(:empty) {
  margin-bottom: 16px;
}
@media (max-width: 620px) {
  .pro-gate.is-compact .pro-cta {
    flex: 0 1 auto;
  }
}

/* Dialog: the night card is the whole shell dialog; content stacked and centred. It never grows
   past the window: the content scrolls inside the rounded card (the close button stays put). */
dialog:has(.pro-gate.is-dialog) {
  max-width: 560px;
  max-height: calc(100dvh - 24px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 28px;
  background: #04241f;
}
dialog:has(.pro-gate.is-dialog) #dialog-content {
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #ffffff3d transparent;
}
dialog:has(.pro-gate.is-dialog) .close-dialog {
  z-index: 2;
  background: #ffffff1f;
  color: #eaf4f1;
}
dialog:has(.pro-gate.is-dialog) .close-dialog:hover {
  background: #ffffff33;
}
.pro-gate.is-dialog {
  max-width: none;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}
.pro-gate.is-dialog .pro-gate-art {
  padding-top: 28px;
}
.pro-gate.is-dialog .pro-gate-art::before {
  width: 190px;
}
.pro-gate.is-dialog .pro-gate-mam {
  width: 108px;
}
.pro-gate.is-dialog .pro-gate-body {
  gap: 10px;
  padding: 4px 28px 22px;
}
dialog .pro-gate.is-dialog .pro-gate-title {
  margin: 0;
  padding: 0;
  font-size: 26px;
  line-height: 32px;
}
dialog .pro-gate.is-dialog .pro-gate-text {
  margin: 0;
  font-size: 15px;
  line-height: 22px;
}
dialog .pro-gate.is-dialog .pro-gate-note,
dialog .pro-gate.is-dialog .pro-gate-prices p {
  margin-bottom: 0;
}
dialog .pro-gate.is-dialog .pro-gate-stores {
  margin: 0;
  font-size: 13px;
}
.pro-gate.is-dialog .pro-gate-links {
  margin-top: -2px;
}
/* Short windows (a laptop with the browser bars, a phone on its side): a smaller Mầm, less air. */
@media (max-height: 760px) {
  .pro-gate.is-dialog .pro-gate-body {
    gap: 8px;
  }
  .pro-gate.is-dialog .pro-gate-art {
    padding-top: 18px;
  }
  .pro-gate.is-dialog .pro-gate-art::before {
    width: 140px;
  }
  .pro-gate.is-dialog .pro-gate-mam {
    width: 80px;
  }
  dialog .pro-gate.is-dialog .pro-gate-title {
    font-size: 23px;
    line-height: 29px;
  }
}
.pro-gate.is-dialog .pro-gate-actions {
  align-self: stretch;
}
.pro-gate.is-dialog .pro-cta {
  flex: 1 1 170px;
}
@media (max-width: 620px) {
  .pro-gate.is-dialog .pro-gate-body {
    padding: 4px 18px 20px;
  }
  .pro-gate.is-dialog .pro-cta {
    flex-basis: 100%;
  }
}


/* ---------- #pro ----------
   The paywall's night hero (Mầm in the crown on a gold glow, the account on a glass line), the four
   plans right under it so the prices sit on the first screen, then what PRO opens. Sized by the
   page's own width (container queries), so the sidebar never squeezes a layout meant for more room. */
.pro-page {
  container: pro-page / inline-size;
  gap: 24px;
}
.pro-slot:empty {
  display: none;
}
.pro-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px 32px;
  min-width: 0;
  padding: 36px 40px 28px;
  overflow: hidden;
  isolation: isolate;
  border-radius: 28px;
  background:
    radial-gradient(circle at 100% 0%, #f5c46b1f, transparent 40%),
    linear-gradient(160deg, var(--pg-night-top) 0%, var(--pg-night-mid) 55%, var(--pg-night-bottom) 100%);
  box-shadow: 0 24px 60px #04241f2e, 0 2px 6px #04241f1f;
  color: var(--pg-ink);
}
.pro-hero :focus-visible {
  outline: 3px solid var(--pg-gold);
  outline-offset: 2px;
}
.pro-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  color: var(--pg-gold);
  font: 700 12px/16px var(--font-app-bold);
  letter-spacing: 1.4px;
  text-transform: uppercase;
}
.pro-eyebrow svg {
  width: 18px;
  height: 18px;
}
.pro-hero-copy h2 {
  margin: 0;
  color: var(--pg-ink);
  font: 700 34px/42px var(--font-app-bold);
  text-wrap: balance;
}
.pro-hero-text {
  max-width: 580px;
  margin: 12px 0 0;
  color: var(--pg-ink-muted);
  font-size: 15.5px;
  line-height: 24px;
}
.pro-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}
.pro-chips li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 10px;
  border: 1px solid var(--pg-gold-border);
  border-radius: 999px;
  background: var(--pg-glass);
  color: var(--pg-chip-ink);
  font: 600 13px/18px var(--font-app);
}
.pro-chips svg {
  width: 15px;
  height: 15px;
  color: var(--pg-gold);
}
.pro-hero-art {
  position: relative;
  display: grid;
  place-items: center;
  width: 230px;
}
.pro-hero-art::before {
  content: "";
  position: absolute;
  width: 250px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #f5c46b8c 0%, #f5c46b33 38%, #f5c46b00 70%);
}
.pro-hero-mam {
  position: relative;
  width: 180px;
}

/* The account line: what this account has, and its one action, on glass. */
.pro-status {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 20px;
  min-width: 0;
  padding: 16px 20px;
  border: 1px solid var(--pg-glass-border);
  border-radius: 18px;
  background: #ffffff0d;
}
.pro-status[data-state="pro"] {
  border-color: var(--pg-gold-border);
  background: #f5c46b14;
}
.pro-status-main {
  min-width: 0;
}
.pro-status-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--pg-gold);
  font: 700 11px/16px var(--font-app-bold);
  letter-spacing: 1.4px;
  text-transform: uppercase;
}
.pro-status-label svg {
  width: 16px;
  height: 16px;
}
.pro-status h2 {
  margin: 2px 0 0;
  color: var(--pg-ink);
  font: 700 18px/24px var(--font-app-bold);
}
.pro-status h2[role="status"]::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 10px;
  border: 2px solid var(--pg-glass-border);
  border-top-color: var(--pg-gold);
  border-radius: 50%;
  vertical-align: 1px;
}
.pro-status p {
  margin: 4px 0 0;
  color: var(--pg-ink-muted);
  font-size: 14px;
  line-height: 21px;
}
.pro-status strong {
  color: var(--pg-ink);
  overflow-wrap: anywhere;
}
.pro-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 20px;
}
.pro-facts div {
  display: flex;
  gap: 6px;
  min-width: 0;
}
.pro-facts dt {
  color: var(--pg-ink-muted);
}
.pro-facts dd {
  margin: 0;
  color: var(--pg-ink);
  font-weight: 600;
  overflow-wrap: anywhere;
}
.pro-status-note {
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--pg-glass);
}
.pro-status-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.pro-status .button {
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--pg-glass-border);
  background: var(--pg-glass-strong);
  color: var(--pg-ink);
  font: 700 14px/20px var(--font-app-bold);
  white-space: nowrap;
}
.pro-status .button:hover {
  background: #ffffff3d;
}
.pro-status .pro-gate-feedback {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--pg-ink);
  font-size: 14px;
}
.pro-status .pro-gate-feedback:empty {
  display: none;
}
@media (prefers-reduced-motion: no-preference) {
  .pro-status h2[role="status"]::after {
    animation: pro-spin 0.9s linear infinite;
  }
}

/* The offer: the four plans as tiles (the year marked), then the buy button and its terms. */
.pro-upgrade {
  container: pro-offer / inline-size;
  display: grid;
  gap: 18px;
  padding: 28px;
}
.pro-upgrade h2 {
  margin: 0;
  font: 700 22px/30px var(--font-app-bold);
  color: var(--md-on-surface);
}
.pro-upgrade p {
  margin: 0;
  font-size: 14.5px;
  line-height: 22px;
  color: var(--md-on-surface-variant);
}
.pro-upgrade-head p {
  margin-top: 4px;
}
.pro-plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 12px;
  min-width: 0;
  margin: 6px 0 0;
  padding: 0;
  border: 0;
}
@container pro-offer (min-width: 640px) {
  .pro-plans {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
  }
}
.pro-plan {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  margin: 0;
  padding: 18px 16px 16px;
  border: 1.5px solid var(--md-outline-variant);
  border-radius: 18px;
  background: var(--md-surface);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.pro-plan:hover {
  border-color: #f29d2e99;
}
.pro-plan.is-selected {
  border-color: var(--sn-pro);
  background: linear-gradient(180deg, #fff4e2, var(--md-surface) 85%);
  box-shadow: 0 0 0 3px #e07a001f, 0 10px 24px #e07a0014;
}
.pro-plan input {
  position: absolute;
  top: 16px;
  right: 14px;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--sn-pro);
}
.pro-plan input:focus-visible {
  outline: 2px solid var(--sn-pro);
  outline-offset: 3px;
}
.pro-plan strong {
  padding-right: 26px;
  font: 700 15px/20px var(--font-app-bold);
  color: var(--md-on-surface);
}
.pro-plan-price {
  margin: 8px 0 2px;
  font: 700 25px/32px var(--font-app-bold);
  color: var(--md-on-streak-container);
  white-space: nowrap;
}
.pro-plan small {
  font-size: 12.5px;
  line-height: 18px;
  color: var(--md-on-surface-variant);
}
.pro-plan .pro-plan-per {
  color: var(--md-warning);
  font-weight: 600;
}
.pro-plan-badge {
  position: absolute;
  top: -11px;
  left: 14px;
  padding: 1px 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--pg-gold-light), var(--pg-gold-deep));
  box-shadow: 0 4px 10px #f2ae3d40;
  color: var(--pg-on-gold);
  font: 700 11px/18px var(--font-app-bold);
  white-space: nowrap;
}
@container pro-offer (max-width: 420px) {
  .pro-plan {
    padding: 14px 12px 12px;
  }
  .pro-plan input {
    top: 14px;
    right: 10px;
  }
  .pro-plan-price {
    margin-top: 4px;
    font-size: 21px;
    line-height: 28px;
  }
  .pro-plan small {
    font-size: 12px;
  }
}
.pro-checkout {
  display: grid;
  gap: 12px;
}
@container pro-offer (min-width: 640px) {
  .pro-checkout {
    grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
    align-items: center;
    gap: 12px 24px;
  }
}
.pro-checkout-terms {
  display: grid;
  gap: 6px;
}
.pro-upgrade .pro-plan-terms {
  font-size: 13px;
  line-height: 19px;
}
.pro-upgrade .pro-secure {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 13px;
  line-height: 19px;
}
.pro-secure svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  color: var(--md-success);
}
.pro-buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 56px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font: 700 16px/20px var(--font-app-bold);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.pro-buy svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}
.pro-buy.is-gold {
  background: linear-gradient(180deg, var(--pg-gold-light), var(--pg-gold-deep));
  color: var(--pg-on-gold);
  box-shadow: 0 8px 22px #f2ae3d3d, inset 0 1px 0 #ffffff80;
}
.pro-buy.is-gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px #f2ae3d59, inset 0 1px 0 #ffffff80;
}
.pro-buy.is-glass {
  border: 1.5px solid var(--sn-pro);
  background: var(--md-surface);
  color: var(--md-on-streak-container);
}
.pro-buy:disabled {
  cursor: progress;
  opacity: 0.7;
  transform: none;
}
.pro-billing-feedback:empty {
  display: none;
}
.pro-upgrade .pro-billing-feedback {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--md-error-container);
  color: var(--md-on-error-container);
  font-size: 13.5px;
  line-height: 19px;
}
.pro-upgrade .pro-in-app {
  padding-top: 14px;
  border-top: 1px solid var(--md-outline-variant);
  font-size: 13.5px;
}
.pro-in-app a {
  color: var(--md-primary);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pro-upgrade .pro-muted,
.pro-muted {
  font-size: 13px;
  line-height: 19px;
  color: var(--md-on-surface-variant);
}

/* What PRO opens: the app's three highlights, the web's free-vs-PRO table and the twelve benefits. */
.pro-in {
  display: grid;
  gap: 14px;
}
.pro-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.pro-highlight {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 20px;
}
.pro-highlight-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 6px;
  border-radius: 13px;
  background: linear-gradient(180deg, var(--pg-gold-light), var(--pg-gold-deep));
  box-shadow: 0 4px 12px #f2ae3d40, inset 0 1px 0 #ffffff80;
  color: var(--pg-on-gold);
}
.pro-highlight-icon svg {
  width: 22px;
  height: 22px;
}
.pro-highlight h3 {
  margin: 0;
  font: 700 16px/22px var(--font-app-bold);
}
.pro-highlight p,
.pro-steps {
  margin: 0;
  font-size: 14px;
  line-height: 21px;
  color: var(--md-on-surface-variant);
}
.pro-details {
  display: grid;
  gap: 24px;
  align-items: start;
}
@container pro-page (min-width: 940px) {
  .pro-details {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  }
}
.pro-compare,
.pro-benefits {
  display: grid;
  gap: 6px;
}
.pro-compare-scroll {
  margin-top: 8px;
  overflow-x: auto;
}
.pro-compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 20px;
}
.pro-compare-table th,
.pro-compare-table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--md-outline-variant);
  text-align: left;
  vertical-align: top;
}
.pro-compare-table tr > :first-child {
  padding-left: 0;
}
.pro-compare-table tbody tr:last-child > * {
  border-bottom: 0;
}
.pro-compare-table thead th {
  padding-top: 4px;
  color: var(--md-on-surface-variant);
  font: 700 12px/16px var(--font-app-bold);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.pro-compare-head {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px 2px 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--pg-gold-light), var(--pg-gold-deep));
  color: var(--pg-on-gold);
  letter-spacing: 1px;
}
.pro-compare-head svg {
  width: 14px;
  height: 14px;
}
.pro-compare-table tbody th {
  width: 32%;
  color: var(--md-on-surface);
  font-weight: 600;
}
.pro-compare-table tr > :last-child {
  width: 30%;
}
.pro-compare-table td {
  color: var(--md-on-surface-variant);
}
.pro-compare-table td:last-child {
  background: #fff8ec;
}
.pro-compare-pro {
  display: inline-flex;
  align-items: flex-start;
  gap: 6px;
  color: var(--md-on-streak-container);
  font-weight: 700;
}
.pro-compare-pro svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: var(--sn-pro);
}
.pro-compare-none {
  color: var(--md-outline);
}
.pro-compare .pro-muted {
  margin-top: 10px;
}
.pro-benefit-list {
  display: grid;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.pro-benefit-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--md-outline-variant);
  font-size: 14.5px;
  line-height: 22px;
}
.pro-benefit-list li:last-child {
  border-bottom: 0;
}
.pro-check {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--md-streak-container);
  color: var(--sn-pro);
}
.pro-check svg {
  width: 15px;
  height: 15px;
}

/* Already bought in the app, and the after-checkout card. */
.pro-help {
  display: grid;
  gap: 10px;
}
.pro-help h2,
.pro-confirm h2 {
  margin: 0;
  font: 700 18px/24px var(--font-app-bold);
  color: var(--md-on-surface);
}
.pro-steps {
  display: grid;
  gap: 8px;
  padding-left: 20px;
  color: var(--md-on-surface);
}
@container pro-page (min-width: 940px) {
  .pro-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 28px;
  }
}
.pro-confirm {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  border-color: #f29d2e59;
  background: linear-gradient(180deg, var(--md-streak-container), var(--md-surface) 80%);
}
.pro-confirm h2 {
  color: var(--md-on-streak-container);
}
.pro-confirm p {
  margin-top: 4px;
  font-size: 14px;
  line-height: 21px;
  color: var(--md-on-surface-variant);
}
.pro-confirm .button {
  margin-top: 10px;
  border-radius: 999px;
}
.pro-confirm-mam {
  width: 72px;
}
.pro-confirm.is-confirming {
  grid-template-columns: minmax(0, 1fr);
}
.pro-confirm.is-confirming h2::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 10px;
  border: 2px solid #f29d2e59;
  border-top-color: var(--sn-pro);
  border-radius: 50%;
  vertical-align: 1px;
}
@media (prefers-reduced-motion: no-preference) {
  .pro-confirm.is-confirming h2::after {
    animation: pro-spin 0.9s linear infinite;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pro-plan,
  .pro-buy {
    transition: none;
  }
  .pro-buy.is-gold:hover {
    transform: none;
  }
}

@media (max-width: 620px) {
  .pro-page {
    gap: 16px;
  }
}
/* Narrower pages: Mầm shrinks, then sits in the hero's corner; the highlights stack. */
@container pro-page (max-width: 860px) {
  .pro-hero {
    padding: 30px 28px 24px;
  }
  .pro-hero-copy h2 {
    font-size: 30px;
    line-height: 38px;
  }
  .pro-hero-art {
    width: 170px;
  }
  .pro-hero-art::before {
    width: 190px;
  }
  .pro-hero-mam {
    width: 136px;
  }
  .pro-highlights {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .pro-highlight {
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 14px;
    padding: 16px 18px;
  }
  .pro-highlight-icon {
    grid-row: span 2;
    margin-bottom: 0;
  }
}
@container pro-page (max-width: 560px) {
  .pro-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding: 22px 18px 18px;
    border-radius: 24px;
  }
  .pro-hero-copy .pro-eyebrow,
  .pro-hero-copy h2 {
    padding-right: 76px;
  }
  .pro-hero-copy h2 {
    font-size: 22px;
    line-height: 29px;
  }
  /* The offer right below says the same; the prices come first on a phone. */
  .pro-hero-text {
    display: none;
  }
  /* Plain checks instead of pills: two short lines rather than three rows. */
  .pro-chips {
    gap: 4px 12px;
    margin-top: 10px;
  }
  .pro-chips li {
    gap: 4px;
    padding: 0;
    border: 0;
    background: none;
    font-size: 12.5px;
  }
  .pro-hero-art {
    position: absolute;
    top: 8px;
    right: 4px;
    width: 84px;
  }
  .pro-hero-art::before {
    width: 110px;
  }
  .pro-hero-mam {
    width: 72px;
  }
  .pro-status {
    gap: 10px 12px;
    padding: 12px 12px 12px 16px;
  }
  .pro-status h2 {
    font-size: 16px;
    line-height: 22px;
  }
  .pro-status p,
  .pro-facts {
    font-size: 13px;
    line-height: 19px;
  }
  .pro-status .button {
    padding: 0 14px;
    font-size: 13px;
  }
  .pro-status .button svg {
    display: none;
  }
  .pro-upgrade {
    padding: 20px 16px;
  }
  .pro-upgrade h2 {
    font-size: 20px;
    line-height: 28px;
  }
  /* Each feature on its own line, its free and PRO values side by side under it. */
  .pro-compare-table {
    font-size: 13px;
    line-height: 19px;
  }
  .pro-compare-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    border-bottom: 1px solid var(--md-outline-variant);
  }
  .pro-compare-table tbody tr:last-child {
    border-bottom: 0;
  }
  .pro-compare-table th,
  .pro-compare-table td,
  .pro-compare-table tbody th,
  .pro-compare-table tr > :last-child {
    width: auto;
    padding: 8px 10px;
    border-bottom: 0;
  }
  .pro-compare-table thead th:first-child {
    display: none;
  }
  .pro-compare-table tbody th {
    grid-column: 1 / -1;
    padding: 10px 0 2px;
  }
  .pro-compare-table td:first-of-type {
    padding-left: 0;
  }
  .pro-compare-table td:last-child {
    border-radius: 8px;
    margin-bottom: 8px;
  }
  .pro-benefit-list li {
    font-size: 14px;
    line-height: 21px;
  }
}

/* A locked item opened by its link (Hội thoại mỗi ngày): its cover above the gate. */
.pro-gated { display: grid; justify-items: center; gap: 20px; max-width: 720px; margin: 0 auto; padding: 16px; }
.pro-gated-cover { width: 100%; max-width: 560px; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 20px; box-shadow: var(--shadow, 0 6px 24px rgb(0 0 0 / 0.12)); }

/* A story read as text only (pro-ui.js textOnlyNote): what the free reading includes, and the plans. */
.text-only-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  padding: 10px 10px 10px 14px;
  border-radius: 14px;
  background: var(--md-primary-container);
  color: var(--sn-hero);
}
.text-only-note p {
  flex: 1;
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}
.text-only-icon {
  display: inline-flex;
  flex: none;
}
.text-only-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}
.text-only-note .pro-link {
  flex: none;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--md-primary);
  color: #fff;
  font: 700 14px/20px var(--font-app);
  cursor: pointer;
}
.text-only-note .pro-link:hover {
  filter: brightness(1.08);
}
@media (max-width: 520px) {
  .text-only-note {
    flex-wrap: wrap;
  }
  .text-only-note .pro-link {
    margin-left: 30px;
  }
}
