.home-game {
  position: relative;
  display: flex;
  min-width: 0;
}
.home-game-wide {
  grid-column: span 2;
}
.home-game .tile {
  width: 100%;
}
.home-game-wide .tile-text {
  padding-right: 48px;
}
.pro-entry {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 44px;
  min-width: 44px;
  padding: 5px 7px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--color-text);
  font: inherit;
  font-size: 0.65rem;
  font-weight: 900;
  cursor: pointer;
}
.pro-badge-art {
  width: 22px;
  height: 24px;
}
.pro-entry .pro-badge-art {
  width: 16px;
  height: 18px;
}
.pro-shackle {
  fill: none;
  stroke: var(--color-text);
  stroke-width: 3;
  stroke-linecap: round;
}
.pro-shield {
  fill: var(--color-primary);
}
.pro-star {
  fill: #ffe086;
}
.pro-lock {
  font-size: 1.1rem;
}
.home-game .tile-title {
  padding-right: 8px;
}
.detective-free {
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  background: var(--color-surface);
}
.detective-free p {
  margin: 0 0 12px;
}
.journey-world-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pro-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  align-items: center;
  justify-items: center;
  padding: calc(16px + env(safe-area-inset-top)) 16px
    calc(16px + env(safe-area-inset-bottom));
  background: #080b20b3;
  overflow: hidden;
}
.pro-dialog {
  position: relative;
  width: min(100%, 460px);
  max-height: calc(
    100dvh - 48px - env(safe-area-inset-top) - env(safe-area-inset-bottom)
  );
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 24px;
  border: 1px solid var(--color-border);
  border-radius: 26px;
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: 0 24px 80px #0004;
}
.pro-dialog h2 {
  font-size: 1.35rem;
  overflow-wrap: anywhere;
}
.pro-mascot {
  width: 90px;
  margin: 0 auto 12px;
}
.pro-close {
  position: absolute;
  top: 8px;
  right: 8px;
}
.pro-dialog form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pro-dialog input {
  width: 100%;
  min-height: 48px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-bg);
  color: var(--color-text);
  font: inherit;
}
.pro-plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
}
.pro-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  min-height: 44px;
  font-size: 0.9rem;
  line-height: 1.5;
}
.pro-consent input[type="checkbox"] {
  width: 22px;
  min-height: 22px;
  height: 22px;
  flex: 0 0 22px;
  margin: 3px 0 0;
  padding: 0;
  accent-color: var(--color-primary);
}
.pro-plan {
  min-width: 0;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  border: 2px solid var(--color-border);
  border-radius: 16px;
  color: var(--color-text);
  background: var(--color-bg);
  font: inherit;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.pro-plan[aria-pressed="true"] {
  border-color: var(--color-primary);
}
.pro-plan span {
  font-size: 0.85rem;
}
.pro-status {
  color: var(--color-muted);
  font-size: 0.9rem;
}
.pro-dialog .btn + .btn {
  margin-top: 12px;
}
body {
  background-image:
    radial-gradient(
      ellipse at 100% 0,
      color-mix(in srgb, var(--color-primary) 7%, transparent),
      transparent 420px
    ),
    radial-gradient(
      ellipse at 0 40%,
      color-mix(in srgb, var(--color-accent-3) 6%, transparent),
      transparent 480px
    );
}
body::before,
body::after {
  display: none;
}
.card,
.tile,
.journey-panel-text {
  min-width: 0;
}
.tile-title,
.genny-choice span,
.journey-panel h3,
.profile-row p {
  overflow-wrap: anywhere;
}
.genny-picker h3 {
  margin: 20px 0 10px;
  font-size: 1rem;
}
.genny-picker {
  scroll-margin-top: calc(100px + env(safe-area-inset-top));
}
.genny-choices,
.genny-colors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.genny-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  min-height: 100px;
  padding: 10px;
  border: 2px solid var(--color-border);
  border-radius: 18px;
  color: var(--color-text);
  background: var(--color-bg);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
}
.genny-choice[aria-pressed="true"] {
  border-color: var(--color-primary);
  background: color-mix(
    in srgb,
    var(--color-primary) 10%,
    var(--color-surface)
  );
  box-shadow: inset 0 0 0 1px var(--color-primary);
}
.genny-choice .mascot {
  width: 64px;
  height: 68px;
}
.profile-genny .mascot {
  width: 52px;
  height: 56px;
}
.genny-color-mint {
  --genny-a: #22b897;
  --genny-b: #86e4b8;
}
.genny-color-ocean {
  --genny-a: #2585dc;
  --genny-b: #65d7f1;
}
.genny-color-sunshine {
  --genny-a: #ef9b26;
  --genny-b: #ffe184;
}
.genny-color-violet {
  --genny-a: #8857e4;
  --genny-b: #c5a6ff;
}
.mascot:is(
    .genny-color-mint,
    .genny-color-ocean,
    .genny-color-sunshine,
    .genny-color-violet
  )
  .art-stop-1 {
  stop-color: var(--genny-a);
}
.mascot:is(
    .genny-color-mint,
    .genny-color-ocean,
    .genny-color-sunshine,
    .genny-color-violet
  )
  .art-stop-2 {
  stop-color: var(--genny-b);
}
.genny-ear {
  fill: var(--genny-a, var(--color-primary));
}
.genny-ear-inner {
  fill: #ffe5d5;
}
.mascot:not(.genny-character-robot) .m-antenna {
  display: none;
}
@media (min-width: 480px) {
  .genny-choices {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .genny-colors {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
@media (max-width: 480px) {
  .app-main {
    padding: 12px;
    gap: 12px;
  }
  .app-header {
    padding: 12px 16px;
    padding-top: calc(12px + env(safe-area-inset-top));
  }
  .app-header h1 {
    font-size: 1.3rem;
    line-height: 1.25;
  }
  .card {
    padding: 16px;
  }
  .tile {
    padding: 12px;
  }
  .tile-grid {
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tile .tile-art {
    width: 48px;
    height: 48px;
  }
  .hero {
    gap: 10px;
  }
  .hero-text h2 {
    font-size: 1.35rem;
    line-height: 1.25;
  }
  .hero-chips {
    gap: 6px;
  }
  .app-main .journey-panel {
    padding: 14px;
    gap: 12px;
    margin: 0;
    border-radius: 20px;
  }
  .app-main .journey-panel h3 {
    font-size: 1.2rem;
    line-height: 1.25;
  }
  .app-main .journey-panel p {
    font-size: 0.9rem;
  }
  .app-main .journey-panel .btn {
    white-space: normal;
    padding: 10px 12px;
    height: auto;
  }
  .app-main .journey-art {
    width: 70px;
  }
}
.journey-panel {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  margin: 16px 0;
  border: 1px solid var(--color-border);
  border-radius: 24px;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--color-primary) 14%, var(--color-surface)),
    var(--color-bg)
  );
  overflow: hidden;
}
.journey-art {
  width: 100px;
  max-width: 28%;
  flex-shrink: 0;
}
.journey-orbit {
  fill: color-mix(in srgb, var(--color-primary) 12%, var(--color-bg));
  stroke: var(--color-primary);
  stroke-dasharray: 5 8;
  stroke-width: 2;
  transform-origin: center;
  animation: journey-orbit 40s linear infinite;
}
.journey-panel-text {
  flex: 1;
  min-width: 0;
}
.journey-panel h3 {
  margin: 8px 0;
}
.journey-panel p {
  color: var(--color-text);
  font-size: 0.84rem;
  margin: 8px 0;
}
.journey-chapters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}
.journey-chapters .chip {
  min-height: 44px;
}
.journey-companion {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 16px 0;
  padding: 12px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--color-primary) 9%, var(--color-bg));
}
.journey-companion > div {
  width: 60px;
  flex-shrink: 0;
}
.journey-companion svg {
  width: 100%;
  max-width: 100%;
}
.journey-companion p {
  margin: 0;
  color: var(--color-text);
}
.journey-question {
  display: flex;
  align-items: center;
  gap: 12px;
}
.journey-question h3 {
  flex: 1;
  min-width: 0;
  margin: 0;
}
.journey-question .journey-art {
  width: 64px;
}
.journey-companion.is-cheering {
  animation: journey-pop 0.4s ease-out;
}
.journey-inbox {
  margin-bottom: 18px;
}
.journey-inbox > h2 {
  cursor: pointer;
  font-weight: 800;
  min-height: 44px;
}
.journey-inbox article {
  margin-top: 12px;
  padding: 14px;
  border-radius: 18px;
  background: var(--color-bg);
}
.journey-inbox h3 {
  margin-top: 0;
}
.journey-reminders {
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
  margin-top: 18px;
}
.journey-reminders label {
  display: block;
  margin: 12px 0;
}
.journey-reminders input[type="number"] {
  max-width: 90px;
  min-height: 44px;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 8px;
}
@keyframes journey-orbit {
  to {
    transform: rotate(360deg);
  }
}
@keyframes journey-pop {
  50% {
    transform: translateY(-4px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .journey-orbit,
  .journey-companion.is-cheering {
    animation: none;
  }
}

/* Pro is a membership accent, layered over the chosen light/dark mode. */
.pro-label {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid #ffeab0;
  border-radius: 7px;
  background: linear-gradient(135deg, #fff0bd, #f8c65a);
  color: #35205e;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.25;
  vertical-align: middle;
}
html[data-membership="pro"] {
  --color-primary: #6940cb;
  --color-primary-2: #3154ae;
  --color-primary-ink: #fff;
  --color-accent-3: #9672ec;
}
html[data-membership="pro"][data-theme="dark"] {
  --color-primary: #b99aff;
  --color-primary-2: #aaadff;
  --color-primary-ink: #201232;
}
html[data-membership="pro"] .app-header {
  color: #fff;
  background: linear-gradient(115deg, #382267, #6341b5 65%, #284985);
  box-shadow: 0 3px 0 #efc767;
}
html[data-membership="pro"] .app-header .eyebrow {
  opacity: 1;
}
html[data-membership="pro"] .hero {
  border: 2px solid #b594e4;
  box-shadow: 0 12px 30px -18px #6940cb88;
}
html[data-membership="pro"] .profile-genny {
  box-shadow:
    0 0 0 3px #efc767,
    0 0 0 7px #9672ec30;
}
.pro-showcase {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 16px;
  overflow: hidden;
  margin-bottom: 16px;
  padding: 22px;
  border: 1px solid #a98add;
  border-radius: 24px;
  background:
    radial-gradient(ellipse at top right, #7952bf, transparent 65%), #302050;
  color: #fff;
}
.pro-showcase-copy {
  min-width: 0;
}
.pro-showcase-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 900;
}
.pro-showcase h2 {
  margin: 12px 0;
  color: #fff;
  font-size: clamp(1.2rem, 4vw, 1.55rem);
  line-height: 1.3;
}
.pro-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
  line-height: 1.5;
}
.pro-benefits li::before {
  content: "✦";
  margin-right: 7px;
  color: #ffe39a;
}
.pro-showcase-orbit {
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid #d1b3ff80;
  border-radius: 16px;
  background: #ffffff12;
  color: #ffe39a;
  font-size: 2rem;
  transform: rotate(-8deg);
}
.pro-member-status {
  margin: 12px 0 0;
  color: #ffe8b3;
  font-size: 0.85rem;
}
.pro-dialog .pro-showcase {
  padding: 16px;
  margin-top: 12px;
}
.pro-dialog .pro-showcase-orbit {
  display: none;
}
.pro-plan[aria-pressed="true"] {
  border-color: #9f73de;
  box-shadow: 0 0 0 2px #9f73de40;
}
@media (max-width: 380px) {
  .pro-showcase {
    padding: 18px;
    gap: 12px;
  }
  .pro-showcase-orbit {
    display: none;
  }
}

/* Clear recurring prices, with a truthful comparison against monthly billing. */
.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  padding: 20px;
  text-align: left;
  border: 2px solid #a9c2e7;
  background: linear-gradient(155deg, #f2f8ff, #fff);
  color: #253655;
}
.plan-card.plan-yearly {
  border-color: #d5b36b;
  background:
    radial-gradient(ellipse at top right, #7952bf, transparent 75%), #302050;
  color: #fff;
}
.plan-card .plan-name {
  font-size: 1rem;
  font-weight: 900;
  white-space: normal;
}
.plan-card .plan-price {
  font-size: clamp(1.8rem, 6vw, 2.3rem);
  line-height: 1.2;
  color: inherit;
}
.plan-card .plan-price > span {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: normal;
}
.plan-card .plan-pitch {
  font-size: 0.9rem;
  line-height: 1.45;
  white-space: normal;
}
.plan-card .plan-saving {
  padding: 4px 9px;
  border-radius: 8px;
  background: #ffe3a3;
  color: #352044;
  font-size: 0.8rem;
  font-weight: 900;
  white-space: normal;
}
.plan-card .plan-billing,
.plan-card .plan-comparison {
  font-size: 0.8rem;
  line-height: 1.5;
  white-space: normal;
}
.plan-card .plan-equivalent {
  color: #ffe8b3;
  font-weight: 800;
  font-size: 0.9rem;
  white-space: normal;
}
.pro-plan[aria-pressed="true"] {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
}
.pro-plan[aria-pressed="true"]::after {
  content: "✓";
  position: absolute;
  right: 9px;
  top: 8px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffe3a3;
  color: #352044;
  font-weight: 900;
}
.pro-plan .plan-name {
  padding-right: 18px;
}
html[data-theme="dark"] .plan-monthly {
  background: linear-gradient(155deg, #233a59, #20243c);
  border-color: #7596c1;
  color: #eef4ff;
}
@media (max-width: 540px) {
  .pro-plans,
  .site-pricing .site-price-grid {
    grid-template-columns: 1fr;
  }
}

.pro-dialog {
  --shadow-pop: 0 8px 0 #49239b;
  --color-primary: #6940cb;
  --color-primary-2: #3154ae;
  --color-primary-ink: #fff;
}
html[data-theme="dark"] .pro-dialog {
  --color-primary: #b99aff;
  --color-primary-2: #aaadff;
  --color-primary-ink: #201232;
}

/* Paid membership is a compact status, separate from the upgrade showcase. */
.pro-showcase-active {
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 14px 18px;
  background: var(--color-surface);
  border-color: var(--color-border);
  color: var(--color-text);
}
.pro-showcase-active .pro-member-status {
  flex: 1 1 180px;
  margin: 0;
  color: var(--color-text);
}
.pro-membership .pro-paid-through {
  font-weight: 800;
}
.pro-membership .btn {
  margin-top: 10px;
}
.pro-cancel-confirm {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: var(--color-surface);
}
.pro-unlocked-check {
  fill: none;
  stroke: #ffe086;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
