/* V42 — Rute Hari Saga: a local-only Coffee + Studio continuity demo. */
.v42-saga-day-section {
  min-width: 0;
}

#saga-day-title {
  scroll-margin-top: calc(204px + env(safe-area-inset-top));
}

.v42-saga-day {
  overflow: hidden;
  border: 1px solid rgb(42 29 24 / 16%);
  border-radius: 24px;
  background: #fffaf2;
  box-shadow: 0 14px 34px rgb(42 29 24 / 10%);
}

.v42-saga-day > summary {
  display: grid;
  min-height: 132px;
  grid-template-columns: 70px minmax(0, 1fr) 24px;
  gap: 14px;
  align-items: center;
  padding: 18px;
  cursor: pointer;
  list-style: none;
  background: #2b1b16;
  color: #fffaf0;
}

.v42-saga-day > summary::-webkit-details-marker {
  display: none;
}

.v42-saga-day > summary:focus-visible {
  outline: 3px solid #c9ef72;
  outline-offset: -5px;
}

.v42-saga-day > summary > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.v42-saga-day > summary strong {
  max-width: 17ch;
  color: inherit;
  font-size: clamp(1.15rem, 5.4vw, 1.4rem);
  line-height: 1.05;
  text-wrap: balance;
}

.v42-saga-day > summary small {
  max-width: 29ch;
  color: #ddcfc5;
  font-size: 0.75rem;
  line-height: 1.45;
  text-wrap: pretty;
}

.v42-saga-day > summary > em {
  display: grid;
  place-items: center;
  font-style: normal;
  transition: transform 180ms ease-out;
}

.v42-saga-day[open] > summary > em {
  transform: rotate(180deg);
}

.v42-saga-day-art {
  position: relative;
  display: grid;
  height: 70px;
  grid-template-columns: 1fr 14px 1fr;
  place-items: center;
  border: 1px solid rgb(201 239 114 / 30%);
  border-radius: 21px;
  background: #c9ef72;
  color: #2b1b16;
}

.v42-saga-day-art i,
.v42-saga-day-art b {
  display: grid;
  place-items: center;
  font-style: normal;
}

.v42-saga-day-art b {
  opacity: 0.6;
}

.v42-saga-day-panel {
  padding: 18px;
  border-top: 1px solid rgb(42 29 24 / 10%);
}

.v42-saga-day-form,
.v42-saga-day-form fieldset {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin: 0;
}

.v42-saga-day-form fieldset {
  padding: 0;
  border: 0;
}

.v42-saga-day-form legend {
  margin-bottom: 4px;
  padding: 0;
  color: #2b1b16;
  font-size: 0.875rem;
  font-weight: 800;
}

.v42-saga-day-choice {
  display: grid;
  min-height: 64px;
  grid-template-columns: 20px 68px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid rgb(42 29 24 / 16%);
  border-radius: 17px;
  background: #f6eee3;
  cursor: pointer;
}

.v42-saga-day-choice:has(input:checked) {
  border-color: #2b1b16;
  box-shadow: 0 0 0 2px #c9ef72;
}

.v42-saga-day-choice input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: #2b1b16;
}

.v42-saga-day-choice > span:last-child {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.v42-saga-day-choice strong {
  color: #2b1b16;
  font-size: 0.82rem;
  line-height: 1.2;
}

.v42-saga-day-choice small {
  color: #74655d;
  font-size: 0.75rem;
  line-height: 1.35;
}

.v42-choice-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #a54823;
}

.v42-saga-day-selection {
  min-height: 22px;
  margin: 2px 0 0;
  color: #74655d;
  font-size: 0.75rem;
  font-weight: 700;
}

.v42-saga-day-submit,
.v42-saga-day-next,
.v42-saga-day-finish .button {
  width: 100%;
  min-height: 48px;
}

.v42-saga-day-submit:disabled {
  opacity: 0.48;
}

.v42-saga-day-result {
  display: grid;
  gap: 14px;
}

.v42-saga-day-result > .eyebrow,
.v42-saga-day-result > h3,
.v42-saga-day-result > p {
  margin: 0;
}

.v42-saga-day-result > h3 {
  max-width: 18ch;
  color: #2b1b16;
  font-size: clamp(1.4rem, 6vw, 1.75rem);
  line-height: 1.05;
  text-wrap: balance;
}

.v42-saga-day-result > h3:focus-visible {
  outline: 3px solid #a54823;
  outline-offset: 4px;
  border-radius: 4px;
}

.v42-saga-day-steps {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.v42-saga-day-steps li {
  position: relative;
  display: grid;
  min-height: 76px;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 10px 0;
}

.v42-saga-day-steps li:not(:last-child)::after {
  position: absolute;
  top: 50px;
  bottom: -10px;
  left: 19px;
  width: 2px;
  background: #dacdc2;
  content: "";
}

.v42-step-mark {
  z-index: 1;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgb(42 29 24 / 20%);
  border-radius: 50%;
  background: #f0e3d7;
  color: #2b1b16;
}

.v42-saga-day-steps li[data-state="current"] .v42-step-mark {
  border-color: #2b1b16;
  background: #c9ef72;
}

.v42-saga-day-steps li[data-state="complete"] .v42-step-mark {
  border-color: #1e624c;
  background: #1e624c;
  color: #fffaf0;
}

.v42-saga-day-steps li > span:last-child {
  display: grid;
  gap: 3px;
}

.v42-saga-day-steps small,
.v42-saga-day-steps em {
  color: #74655d;
  font-size: 0.75rem;
  font-style: normal;
  line-height: 1.35;
}

.v42-saga-day-steps strong {
  color: #2b1b16;
  font-size: 0.9rem;
}

/* V93 — Carry Kit: compact context from Coffee Match and Studio Frame Pick. */
.v93-saga-carry {
  display: grid;
  gap: 11px;
  padding: 14px;
  border: 1px solid rgb(42 29 24 / 16%);
  border-radius: 18px;
  background: #f3e8dc;
}

.v93-saga-carry > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.v93-saga-carry > header div {
  min-width: 0;
}

.v93-saga-carry > header p,
.v93-saga-carry > header h4,
.v93-saga-carry > p {
  margin: 0;
}

.v93-saga-carry > header p {
  color: #8a5740;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
}

.v93-saga-carry > header h4 {
  margin-top: 2px;
  color: #2b1b16;
  font-size: 0.94rem;
  line-height: 1.2;
  text-wrap: balance;
}

.v93-saga-carry > header > strong {
  display: grid;
  min-width: 42px;
  min-height: 42px;
  place-items: center;
  border: 1px solid rgb(42 29 24 / 18%);
  border-radius: 50%;
  background: #fffaf2;
  color: #2b1b16;
  font-size: 0.76rem;
}

.v93-saga-carry dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.v93-saga-carry dl > div {
  display: grid;
  min-width: 0;
  min-height: 112px;
  align-content: start;
  gap: 8px;
  padding: 10px;
  border: 1px dashed rgb(42 29 24 / 24%);
  border-radius: 14px;
  background: rgb(255 250 242 / 54%);
}

.v93-saga-carry dl > div[data-ready="true"] {
  border-style: solid;
  background: #fffaf2;
}

.v93-saga-carry dt {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #6f5d53;
  font-size: 0.65rem;
  font-weight: 800;
}

.v93-saga-carry dt span {
  display: grid;
  place-items: center;
}

.v93-saga-carry dd {
  display: grid;
  min-width: 0;
  gap: 3px;
  margin: 0;
}

.v93-saga-carry dd strong {
  overflow: hidden;
  color: #2b1b16;
  font-size: 0.76rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v93-saga-carry dd .v93-carry-source {
  color: #8a5740;
  font-size: 0.56rem;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.v93-saga-carry dd span {
  display: -webkit-box;
  overflow: hidden;
  color: #74655d;
  font-size: 0.66rem;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.v93-saga-carry > p {
  color: #74655d;
  font-size: 0.65rem;
  line-height: 1.4;
  text-wrap: pretty;
}

.v42-saga-day-note {
  padding: 10px 12px;
  border-left: 3px solid #a54823;
  color: #74655d;
  font-size: 0.75rem;
  line-height: 1.45;
}

.v42-saga-day-finish {
  display: grid;
  gap: 10px;
}

.v42-saga-day-finish > strong {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #1e624c;
  font-size: 0.88rem;
}

.v42-saga-day-status {
  min-height: 18px;
  margin: 10px 0 0;
  color: #74655d;
  font-size: 0.75rem;
  line-height: 1.4;
}

.v42-saga-day-status.error {
  color: #9e2f2f;
}

.v94-home-route-card {
  gap: 10px;
  background: #201713;
  color: #fffaf2;
  box-shadow: 0 14px 30px rgb(52 34 24 / 14%);
}

.v94-home-route-section .v27-next-step-heading {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.v94-home-route-section .v27-next-step-heading > span {
  align-self: center;
  justify-self: end;
}

.v94-home-route-progress {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.v94-home-route-progress > strong {
  color: #f2dfc1;
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  white-space: nowrap;
}

.v94-home-route-marks {
  display: flex;
  flex: 1;
  align-items: center;
  max-width: 112px;
}

.v94-home-route-marks span {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: 1px solid rgb(255 250 242 / 28%);
  border-radius: 50%;
  place-items: center;
}

.v94-home-route-marks span[data-state="complete"] {
  border-color: #d8ef96;
  background: #d8ef96;
  color: #193b2f;
}

.v94-home-route-marks span[data-state="current"] {
  border-color: #f4bc84;
  color: #f4bc84;
}

.v94-home-route-marks i {
  flex: 1;
  height: 1px;
  background: rgb(255 250 242 / 24%);
}

.v94-home-route-card .v27-next-step-eyebrow,
.v94-home-route-card .v27-next-step-copy,
.v94-home-route-card footer small {
  color: #d8c9bb;
}

.v94-home-route-card h3 {
  max-width: 15ch;
  color: #fffaf2;
  text-wrap: balance;
}

.v94-home-route-card .v27-next-step-copy {
  max-width: 34ch;
  text-wrap: pretty;
}

.v94-home-route-meter {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(255 250 242 / 15%);
}

.v94-home-route-meter span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: #f4bc84;
  transform-origin: left center;
}

.v94-home-route-card footer button {
  width: 100%;
  padding: 0 14px;
  border-radius: 14px;
  justify-content: space-between;
  color: #201713;
  background: #f2dfc1;
}

.v94-home-route-card footer {
  display: grid;
  width: 100%;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 8px;
}

.v94-home-route-card footer button:focus-visible {
  outline-color: #fffaf2;
}

/* V95 — Saga Day Recap: a local-only completion artifact with native sharing. */
.v95-saga-recap {
  position: relative;
  display: grid;
  gap: 16px;
  overflow: hidden;
  padding: 18px;
  border: 1px solid #4c3a31;
  border-radius: 22px;
  color: #fffaf2;
  background: #201713;
  box-shadow: 0 16px 34px rgb(32 23 19 / 16%);
}

.v95-saga-recap::after {
  position: absolute;
  top: 20px;
  right: 72px;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: #d8ef96;
  content: "";
  transform: rotate(45deg);
}

.v95-saga-recap > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.v95-saga-recap .eyebrow {
  margin: 0 0 5px;
  color: #f4bc84;
}

.v95-saga-recap h4 {
  max-width: 16ch;
  margin: 0;
  color: #fffaf2;
  font-size: clamp(1.35rem, 6.2vw, 1.65rem);
  line-height: 1.08;
  text-wrap: balance;
}

.v95-saga-recap > header > strong {
  display: grid;
  min-width: 52px;
  min-height: 42px;
  padding: 0 9px;
  border: 1px solid rgb(255 250 242 / 24%);
  border-radius: 13px;
  place-items: center;
  color: #d8ef96;
  font-size: .82rem;
}

.v95-saga-recap-rail {
  display: flex;
  align-items: center;
  max-width: 172px;
}

.v95-saga-recap-rail span {
  display: grid;
  flex: 0 0 48px;
  min-height: 48px;
  border: 1px solid rgb(255 250 242 / 28%);
  border-radius: 16px;
  place-items: center;
}

.v95-saga-recap-rail span b {
  display: grid;
  color: #f4bc84;
  place-items: center;
}

.v95-saga-recap-rail span small {
  color: #d8c9bb;
  font-size: .62rem;
  font-weight: 700;
}

.v95-saga-recap-rail > i {
  flex: 1;
  height: 1px;
  background: #d8ef96;
}

.v95-saga-recap > ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.v95-saga-recap > ol > li {
  display: grid;
  min-width: 0;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid rgb(255 250 242 / 14%);
  border-radius: 16px;
  background: #2b211c;
}

.v95-saga-recap > ol > li > span {
  display: grid;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  place-items: center;
  color: #193b2f;
  background: #d8ef96;
}

.v95-saga-recap li div {
  min-width: 0;
}

.v95-saga-recap li small,
.v95-saga-recap li strong,
.v95-saga-recap li p {
  display: block;
}

.v95-saga-recap li small {
  color: #f4bc84;
  font-size: .69rem;
  font-weight: 700;
}

.v95-saga-recap li strong {
  margin-top: 2px;
  color: #fffaf2;
  line-height: 1.25;
  text-wrap: balance;
}

.v95-saga-recap li p,
.v95-saga-recap .v95-saga-recap-note {
  margin: 3px 0 0;
  color: #d8c9bb;
  font-size: .76rem;
  line-height: 1.45;
  text-wrap: pretty;
}

.v95-saga-recap-note {
  padding-top: 12px;
  border-top: 1px dashed rgb(255 250 242 / 22%);
}

.v95-saga-recap-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.v95-saga-recap-actions .button {
  min-height: 46px;
  padding-inline: 14px;
  justify-content: center;
  color: #201713;
  background: #f2dfc1;
}

.v95-saga-recap-actions .text-action {
  min-height: 44px;
  color: #fffaf2;
}

.v95-saga-recap-actions button:focus-visible {
  outline-color: #fffaf2;
}

.v95-saga-recap .v95-saga-recap-status {
  min-height: 1.2em;
  margin: -6px 0 0;
  color: #d8ef96;
  font-size: .75rem;
  line-height: 1.4;
}

@media (max-width: 350px) {
  .v42-saga-day > summary {
    grid-template-columns: 58px minmax(0, 1fr) 20px;
    gap: 10px;
    padding: 14px;
  }

  .v42-saga-day-art {
    height: 58px;
    grid-template-columns: 1fr;
  }

  .v42-saga-day-art b {
    display: none;
  }

  .v42-saga-day-choice {
    grid-template-columns: 20px minmax(0, 1fr);
  }

  .v42-choice-icons {
    display: none;
  }

  .v93-saga-carry dl {
    grid-template-columns: 1fr;
  }

  .v93-saga-carry dl > div {
    min-height: 96px;
  }

  .v94-home-route-progress {
    align-items: flex-start;
    flex-direction: column;
  }

  .v95-saga-recap {
    padding: 15px;
  }

  .v95-saga-recap::after {
    right: 66px;
  }

  .v95-saga-recap-actions {
    grid-template-columns: 1fr;
  }

  .v95-saga-recap-actions .text-action {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .v42-saga-day > summary > em {
    transition: none;
  }
}

@media (forced-colors: active) {
  .v42-saga-day,
  .v42-saga-day-choice,
  .v42-step-mark,
  .v42-saga-day-art {
    border: 1px solid CanvasText;
  }

  .v93-saga-carry,
  .v93-saga-carry > header > strong,
  .v93-saga-carry dl > div {
    border: 1px solid CanvasText;
    background: Canvas;
    color: CanvasText;
  }

  .v93-saga-carry > header p,
  .v93-saga-carry > header h4,
  .v93-saga-carry dt,
  .v93-saga-carry dd strong,
  .v93-saga-carry dd small,
  .v93-saga-carry dd span,
  .v93-saga-carry > p {
    color: CanvasText;
  }

  .v94-home-route-card,
  .v94-home-route-marks span,
  .v94-home-route-meter,
  .v94-home-route-card footer button {
    border: 1px solid CanvasText;
    background: Canvas;
    color: CanvasText;
  }

  .v94-home-route-progress > strong,
  .v94-home-route-card .v27-next-step-eyebrow,
  .v94-home-route-card .v27-next-step-copy,
  .v94-home-route-card footer small,
  .v94-home-route-card h3 {
    color: CanvasText;
  }

  .v95-saga-recap,
  .v95-saga-recap > header > strong,
  .v95-saga-recap-rail span,
  .v95-saga-recap > ol > li,
  .v95-saga-recap > ol > li > span,
  .v95-saga-recap-actions .button,
  .v95-saga-recap-actions .text-action {
    border: 1px solid CanvasText;
    background: Canvas;
    color: CanvasText;
  }

  .v95-saga-recap .eyebrow,
  .v95-saga-recap h4,
  .v95-saga-recap li small,
  .v95-saga-recap li strong,
  .v95-saga-recap li p,
  .v95-saga-recap-note,
  .v95-saga-recap-status {
    color: CanvasText;
  }

  .v42-saga-day-choice:has(input:checked) {
    outline: 3px solid Highlight;
    outline-offset: -3px;
  }
}

/* V99 — turn the Coffee + Studio insertion order in Saga Pins into one route. */
.v99-pinned-route {
  display: grid;
  gap: 13px;
  padding: 17px;
  border: 1px solid #4c3a31;
  border-radius: 24px;
  color: #fffaf2;
  background: #201713;
  box-shadow: 0 14px 30px rgb(32 23 19 / 14%);
}

.v99-pinned-route > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.v99-pinned-route > header p,
.v99-pinned-route > header h2,
.v99-pinned-route > p,
.v99-pinned-route > small { margin: 0; }

.v99-pinned-route .eyebrow { color: #f4bc84; font-size: 0.75rem; }

.v99-pinned-route h2 {
  max-width: 14ch;
  color: inherit;
  font-size: clamp(1.35rem, 6vw, 1.7rem);
  line-height: 1.06;
  text-wrap: balance;
}

.v99-pinned-route > header > strong {
  display: grid;
  min-width: 48px;
  min-height: 44px;
  place-items: center;
  border: 1px solid rgb(255 250 242 / 24%);
  border-radius: 14px;
  color: #d8ef96;
  font-size: 0.78rem;
}

.v99-pinned-route-rail {
  display: flex;
  align-items: center;
  max-width: 188px;
}

.v99-pinned-route-rail span {
  display: grid;
  flex: 0 0 58px;
  min-height: 52px;
  place-items: center;
  gap: 2px;
  border: 1px solid rgb(255 250 242 / 28%);
  border-radius: 16px;
}

.v99-pinned-route-rail b { display: grid; color: #f4bc84; place-items: center; }
.v99-pinned-route-rail small { color: #d8c9bb; font-size: 0.75rem; font-weight: 700; }

.v99-pinned-route-rail > i {
  flex: 1;
  height: 1px;
  background: #d8ef96;
}

.v99-pinned-route > p {
  max-width: 36ch;
  color: #d8c9bb;
  font-size: 0.78rem;
  line-height: 1.5;
  text-wrap: pretty;
}

.v99-pinned-route > .button {
  width: 100%;
  min-height: 48px;
  justify-content: space-between;
  color: #201713;
  background: #f2dfc1;
}

.v99-pinned-route > .button:focus-visible { outline-color: #fffaf2; }

.v99-pinned-route > small {
  color: #bfaea2;
  font-size: 0.75rem;
  line-height: 1.4;
  text-wrap: pretty;
}

@media (max-width: 350px) {
  .v99-pinned-route { padding: 15px; }
}

@media (forced-colors: active) {
  .v99-pinned-route,
  .v99-pinned-route > header > strong,
  .v99-pinned-route-rail span,
  .v99-pinned-route > .button {
    border: 1px solid CanvasText;
    background: Canvas;
    color: CanvasText;
  }

  .v99-pinned-route .eyebrow,
  .v99-pinned-route h2,
  .v99-pinned-route > p,
  .v99-pinned-route > small,
  .v99-pinned-route-rail b,
  .v99-pinned-route-rail small { color: CanvasText; }
}
