/* Full Lifestyle PDF foundation. Only canonical Lifestyle routes opt in. */
html.life-pdf-layout[data-wz-module="lifestyle"] body.goals-design {
  --goal-panel: var(--life-raised);
  --goal-ink: var(--life-text);
  --goal-muted: var(--life-muted);
  --goal-edge: var(--life-line);
  --goal-link: var(--life-accent);
  --app-text: var(--life-text);
  --app-muted: var(--life-muted);
  --app-card: var(--life-card);
  --app-line: var(--life-line);
  --app-accent: var(--life-accent);
}
html.life-pdf-layout[data-wz-module="lifestyle"]
  :is(#review-app, #goal-setup-app, #lifestyle-workspace)
  > h1,
html.life-pdf-layout[data-wz-module="lifestyle"]
  :is(#review-app, #goal-setup-app)
  > .hero
  h1 {
  font-size: 27px;
  line-height: 1.2;
  text-align: center;
  color: var(--life-text);
  margin: 8px 0 20px;
}
html.life-pdf-layout[data-wz-module="lifestyle"] .hero {
  height: auto;
  min-height: 0;
  background: none;
  padding: 0;
  margin: 0 0 16px;
  border: 0;
}
html.life-pdf-layout[data-wz-module="lifestyle"] .hero > p {
  font-size: 15px;
}
html.life-pdf-layout[data-wz-module="lifestyle"]
  :is(.glass, .goals-empty, .goals-tools, .goals-record) {
  background: var(--life-card) !important;
  color: var(--life-text);
  border: 1px solid var(--life-line);
  box-shadow:
    inset 0 1px 1px #ffffff40,
    0 2px 5px #092b4318;
}
html.life-pdf-layout[data-wz-module="lifestyle"]
  :is(.goals-filters, .life-filter-tabs) {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  padding: 4px;
  border: 1px solid var(--life-line);
  border-radius: 12px;
  background: var(--balance-inset);
}
html.life-pdf-layout[data-wz-module="lifestyle"] .goals-filters button {
  flex: 1 1 60px;
  font-size: 14px;
  min-height: 44px;
}
html.life-pdf-layout[data-wz-module="lifestyle"]
  .goals-filters
  button[aria-pressed="true"] {
  background: var(--life-primary);
  color: var(--life-primary-ink);
}
html.life-pdf-layout[data-wz-module="lifestyle"]
  :is(.goals-state, .goals-summary dt) {
  font-size: 13px !important;
}
html.life-pdf-layout[data-wz-module="lifestyle"] :is(.primary, .goals-primary) {
  background: var(--life-primary) !important;
  color: var(--life-primary-ink) !important;
  border-color: var(--life-accent) !important;
}
html.life-pdf-layout[data-wz-module="lifestyle"]
  :is(.life-control-sheet, #life-sheet) {
  width: calc(100% - 24px);
  max-width: 496px;
  max-height: 88dvh;
  overflow: auto;
  margin: auto auto max(8px, env(safe-area-inset-bottom));
  padding: 20px;
  border: 1px solid var(--life-line);
  border-radius: 24px;
  background: var(--life-raised) !important;
  background-image: none !important;
  color: var(--life-text);
  box-shadow: 0 18px 60px #001d3b50;
  font:
    16px/1.5 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
html.life-pdf-layout[data-wz-module="lifestyle"] dialog::backdrop {
  background: #06142688;
  backdrop-filter: blur(3px);
}
html.life-pdf-layout[data-wz-module="lifestyle"]
  dialog
  :is(h2, h3, p, label, legend) {
  color: var(--life-text);
}
html.life-pdf-layout[data-wz-module="lifestyle"] dialog h2 {
  font-size: 23px;
  line-height: 1.25;
  margin: 0 0 18px;
}
html.life-pdf-layout[data-wz-module="lifestyle"] dialog :is(button, a) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 10px 14px;
  margin: 6px 4px 6px 0;
  border: 1px solid var(--life-line);
  border-radius: 12px;
  background: var(--life-card);
  color: var(--life-accent);
  font: inherit;
  line-height: 1.35;
  max-width: 100%;
}
html.life-pdf-layout[data-wz-module="lifestyle"]
  dialog
  :is(label, input, textarea, select) {
  font: inherit;
  font-size: 16px;
  max-width: 100%;
  box-sizing: border-box;
}
html.life-pdf-layout[data-wz-module="lifestyle"] dialog label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 12px 0;
}
html.life-pdf-layout[data-wz-module="lifestyle"]
  dialog
  :is(input:not([type="checkbox"]):not([type="radio"]), textarea, select) {
  width: 100%;
  min-height: 44px;
  padding: 10px;
  border: 1px solid var(--life-line);
  border-radius: 10px;
  background: var(--life-raised);
  color: var(--life-text);
}
html.life-pdf-layout[data-wz-module="lifestyle"]
  dialog
  label:has(input[type="checkbox"]) {
  flex-direction: row;
  align-items: center;
  min-height: 44px;
}
html.life-pdf-layout[data-wz-module="lifestyle"] dialog .life-sheet-actions {
  position: sticky;
  bottom: -20px;
  display: flex;
  gap: 8px;
  padding: 10px 0 max(10px, env(safe-area-inset-bottom));
  background: var(--life-raised);
}
html.life-pdf-layout[data-wz-module="lifestyle"] .life-sheet-actions button {
  flex: 1;
  margin: 0;
}
html.life-pdf-layout[data-wz-module="lifestyle"]
  .life-sheet-actions
  button:last-child {
  background: var(--life-primary);
  color: var(--life-primary-ink);
  font-weight: 650;
}
html.life-pdf-layout[data-wz-module="lifestyle"] .life-review-values {
  font:
    16px/1.7 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--life-line);
  border-radius: 13px;
  background: var(--life-card);
  color: var(--life-text);
}
html.life-pdf-layout[data-wz-module="lifestyle"] .life-form-section {
  padding: 14px;
  margin: 12px 0;
  border: 1px solid var(--life-line);
  border-radius: 15px;
  background: var(--life-card);
}
html.life-pdf-layout[data-wz-module="lifestyle"] .life-form-section > summary {
  font-weight: 650;
  cursor: pointer;
  min-height: 44px;
  padding: 8px 0;
  color: var(--life-text);
}
html.life-pdf-layout[data-wz-module="lifestyle"] .life-collection-link {
  display: flex !important;
  justify-content: space-between !important;
  text-align: left !important;
  min-height: 64px !important;
  width: 100%;
  font-weight: 600;
}
html.life-pdf-layout[data-wz-module="lifestyle"] .life-record-list > section {
  margin-block: 10px;
}
html.life-pdf-layout[data-wz-module="lifestyle"] .life-record-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
html.life-pdf-layout[data-wz-module="lifestyle"]
  .life-record-actions
  :is(button, a) {
  flex: 1 1 130px;
  margin: 0 !important;
}
html.life-pdf-layout[data-wz-module="lifestyle"] .life-entry-row {
  padding: 12px;
  border: 1px solid var(--life-line);
  border-radius: 13px;
  background: var(--life-raised);
  margin: 8px 0;
}
html.life-pdf-layout[data-wz-module="lifestyle"] .life-entry-row > p {
  margin: 5px 0;
  font-size: 14px;
}
html.life-pdf-layout[data-wz-module="lifestyle"]
  :is(.life-comparison-totals, .life-card-grid) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
html.life-pdf-layout[data-wz-module="lifestyle"] .life-comparison-totals > div {
  text-align: center;
  padding: 14px;
  border: 1px solid var(--life-line);
  border-radius: 14px;
  background: var(--life-raised);
}
html.life-pdf-layout[data-wz-module="lifestyle"]
  .life-comparison-totals
  strong {
  display: block;
  font-size: 30px;
  color: var(--life-accent);
}
html.life-pdf-layout[data-wz-module="lifestyle"] .life-comparison-share {
  display: flex;
  min-height: 32px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--life-line);
  margin: 14px 0;
}
html.life-pdf-layout[data-wz-module="lifestyle"] .life-comparison-share > span {
  min-width: 0;
  background: var(--life-primary);
  color: var(--life-primary-ink);
}
html.life-pdf-layout[data-wz-module="lifestyle"]
  .life-comparison-share
  > span
  + span {
  background: var(--balance-inset);
  color: var(--life-text);
}
html.life-pdf-layout[data-wz-module="lifestyle"] .life-catalog-card {
  overflow: hidden;
}
html.life-pdf-layout[data-wz-module="lifestyle"] .life-catalog-art {
  margin: 0 -16px 12px;
  border-radius: 0 !important;
  max-height: 210px;
}
html.life-pdf-layout[data-wz-module="lifestyle"] .life-habit-calendar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 16px 0;
}
html.life-pdf-layout[data-wz-module="lifestyle"]
  .life-habit-calendar
  .life-habit-day {
  flex: 1 1 44px;
  min-width: 44px;
  padding: 8px 4px;
  font-size: 14px;
}
html.life-pdf-layout[data-wz-module="lifestyle"]
  .life-habit-calendar
  [aria-pressed="true"] {
  outline: 2px solid var(--life-accent);
  outline-offset: 1px;
}
html.life-pdf-layout[data-wz-module="lifestyle"] .life-habit-day-done {
  border-bottom: 4px solid #24a26a !important;
}
html.life-pdf-layout[data-wz-module="lifestyle"] .life-habit-outcomes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 12px 0;
}
html.life-pdf-layout[data-wz-module="lifestyle"] .life-habit-outcomes button {
  margin: 0 !important;
  padding: 8px 3px !important;
}
html.life-pdf-layout[data-wz-module="lifestyle"]
  .life-habit-outcomes
  button[aria-pressed="true"] {
  background: var(--life-primary) !important;
  color: var(--life-primary-ink) !important;
}
html.life-pdf-layout[data-wz-module="lifestyle"] .life-journey-map {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  margin: 16px 0;
  border: 1px solid var(--life-line);
  border-radius: 16px;
  background: var(--life-raised);
}
html.life-pdf-layout[data-wz-module="lifestyle"] .life-journey-map-scene {
  position: relative;
  width: 100%;
  height: 170px;
  background:
    linear-gradient(#09294166, #09294122),
    url(assets/lifestyle/journey-landscape-v3.png) center 35% / cover;
  color: #eefaff;
}
html.life-pdf-layout[data-wz-module="lifestyle"] .life-journey-map-scene > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
html.life-pdf-layout[data-wz-module="lifestyle"]
  :is(#review-app, #goal-setup-app)
  .life-map-node {
  position: absolute;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 0;
  border-radius: 50%;
  background: var(--life-raised);
  border: 2px solid var(--life-accent);
  color: var(--life-text);
  margin: 0;
  z-index: 1;
}
html.life-pdf-layout[data-wz-module="lifestyle"] .life-map-node-completed {
  background: #14764d !important;
  color: white !important;
  border-color: #58e6a8 !important;
}
html.life-pdf-layout[data-wz-module="lifestyle"] .life-map-node-locked {
  border-style: dashed !important;
}
html.life-pdf-layout[data-wz-module="lifestyle"] .life-journey-map > p {
  padding-inline: 12px;
  font-size: 14px;
}
html.life-pdf-layout[data-wz-module="lifestyle"] .life-icon-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
html.life-pdf-layout[data-wz-module="lifestyle"] .life-icon-grid button {
  min-height: 64px;
  margin: 0;
  padding: 10px 4px;
}
html.life-pdf-layout[data-wz-module="lifestyle"]
  .life-icon-grid
  button[aria-pressed="true"] {
  outline: 2px solid var(--life-accent);
  background: var(--balance-inset);
}
html.life-pdf-layout[data-wz-module="lifestyle"] fieldset {
  min-width: 0;
  max-width: 100%;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--life-line);
  border-radius: 13px;
}
html.life-pdf-layout[data-wz-module="lifestyle"]
  :is(#review-app, #goal-setup-app, #lifestyle-workspace)
  label:has(input[type="checkbox"]) {
  min-height: 44px;
}
html.life-pdf-layout[data-wz-module="lifestyle"]
  dialog
  :is(button, a, input, select, textarea):focus-visible {
  outline: 3px solid var(--life-accent);
  outline-offset: 3px;
}
@media (min-width: 600px) {
  html.life-pdf-layout[data-wz-module="lifestyle"]
    :is(.life-control-sheet, #life-sheet) {
    margin: auto;
  }
}
@media (max-width: 374px) {
  html.life-pdf-layout[data-wz-module="lifestyle"] .life-card-grid {
    grid-template-columns: 1fr;
  }
}
/* Override obsolete shell geometry only inside these PDF routes. */
html.life-pdf-layout[data-wz-module="lifestyle"] {
  background: var(--life-page) !important;
}
html.life-pdf-layout[data-wz-module="lifestyle"] body.wz-lifestyle {
  display: block;
}
html.life-pdf-layout[data-wz-module="lifestyle"]
  :is(main.life-phone, main.connected-page) {
  max-width: 520px !important;
  margin: 0 auto !important;
  padding: 0 16px max(128px, calc(112px + env(safe-area-inset-bottom))) !important;
  color: var(--life-text) !important;
}
html.life-pdf-layout[data-wz-module="lifestyle"] main.phone::before {
  content: none;
}
html.life-pdf-layout[data-wz-module="lifestyle"]
  #wz-standard-header.wz-standard-header {
  background:
    linear-gradient(var(--life-page), transparent 90%),
    var(--life-ridge) center bottom/100% 66px no-repeat !important;
  color: var(--life-text) !important;
}
html.life-pdf-layout[data-wz-module="lifestyle"]
  #connected-content
  .balance-intervals {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}
html.life-pdf-layout[data-wz-module="lifestyle"]
  #connected-content
  .balance-intervals
  button {
  width: 100%;
  font-size: 14px;
  padding: 8px 2px;
  margin: 0;
  overflow-wrap: normal;
}
html.life-pdf-layout[data-wz-module="lifestyle"]
  #lifestyle-workspace
  .life-shortcut-grid
  a {
  font-size: 13px;
  padding-inline: 0;
  overflow-wrap: normal;
}
html.life-pdf-layout[data-wz-module="lifestyle"]
  progress::-webkit-progress-bar {
  background: var(--balance-inset);
}
html.life-pdf-layout[data-wz-module="lifestyle"]
  progress::-webkit-progress-value {
  background: var(--life-primary);
}
html.life-pdf-layout[data-wz-module="lifestyle"]
  .personal-balance-candles
  details
  > summary {
  min-height: 44px;
  padding-block: 10px;
  cursor: pointer;
  color: var(--life-accent);
  font-size: 16px;
}
html.life-pdf-layout[data-wz-module="lifestyle"] .life-review-summary {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
}
@media (max-width: 374px) {
  html.life-pdf-layout[data-wz-module="lifestyle"]
    :is(main.life-phone, main.connected-page) {
    padding-inline: 12px !important;
  }
}
html.life-pdf-layout[data-wz-module="lifestyle"] .goals-area-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 12px;
}
html.life-pdf-layout[data-wz-module="lifestyle"] .goals-area-choices label {
  min-height: 44px;
  margin: 4px 0;
  justify-content: space-between;
}
html.life-pdf-layout[data-wz-module="lifestyle"] .goals-area-choices legend {
  grid-column: 1/-1;
}
html.life-pdf-layout[data-wz-module="lifestyle"] .life-icon-grid button {
  flex-direction: column;
  gap: 6px;
}
html.life-pdf-layout[data-wz-module="lifestyle"] .life-icon-grid svg {
  width: 28px;
  height: 28px;
}
html.life-pdf-layout[data-wz-module="lifestyle"] .life-reminder-weekdays {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}
html.life-pdf-layout[data-wz-module="lifestyle"] .life-reminder-weekdays label {
  margin: 0 !important;
  font-size: 14px !important;
  gap: 5px !important;
}
html.life-pdf-layout[data-wz-module="lifestyle"] .goals-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
html.life-pdf-layout[data-wz-module="lifestyle"] .goals-filters button {
  padding: 8px 1px;
  white-space: nowrap;
  overflow-wrap: normal;
}
html.life-pdf-layout[data-wz-module="lifestyle"] .goals-record::before {
  content: "";
  float: right;
  width: 64px;
  height: 64px;
  margin: 0 0 12px 12px;
  border: 1px solid var(--life-line);
  border-radius: 12px;
  background: url(assets/lifestyle/journey-landscape-v3.png) center/cover;
}
html.life-pdf-layout[data-wz-module="lifestyle"] .life-filter-tabs button {
  width: auto;
  flex: 1 1 105px;
  min-height: 44px;
}
/* Current PDF p40 handoff: keep the current step reachable beside the journey. */
html[data-wz-module="lifestyle"] .goals-record-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  clear: both;
}
html[data-wz-module="lifestyle"] .goals-record-actions a {
  flex: 1 1 140px;
  min-width: 0;
  margin: 0;
}
html[data-wz-module="lifestyle"] .goals-next-step {
  margin-block: 16px;
  overflow-wrap: anywhere;
}
html[data-wz-module="lifestyle"] [id^="life-milestone-"] {
  scroll-margin-block: 16px 100px;
}
