:root {
  --ink: #27365d;
  --muted: #627291;
  --line: #ded5e366;
  --rose: #b86b8f;
  --cream: #fffaf0;
  --ease: cubic-bezier(0.22, 0.75, 0.25, 1);
  color-scheme: light;
  font-family: "Hiragino Maru Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  color: var(--ink);
  background: var(--cream);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background:
    radial-gradient(ellipse at 25% 45%, #ffe3eb88, transparent 48%),
    radial-gradient(ellipse at 80% 52%, #dff0fc88, transparent 48%), #fffaf0;
}
button,
a,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.6;
}
button {
  touch-action: manipulation;
}
button:focus-visible,
a:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #9464bb;
  outline-offset: 5px;
}
button[hidden],
[hidden] {
  display: none !important;
}
a {
  color: inherit;
  text-decoration: none;
}
.experience {
  height: 100svh;
  height: 100dvh;
  min-height: 500px;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 64px);
  display: grid;
  grid-template-rows: 76px auto minmax(0, 1fr) auto 43px;
  overflow: hidden;
}
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}
.brand {
  font-family: Georgia, serif;
  font-size: 29px;
  letter-spacing: -1.5px;
  display: flex;
  gap: 0;
  align-items: center;
}
.brand > span:last-child {
  color: #a89bb1;
}
.brand-orbit {
  display: grid;
  place-items: center;
  font-family: serif;
  width: 30px;
  height: 30px;
  margin-right: 9px;
  border-radius: 50%;
  background: conic-gradient(
    from 40deg,
    #b3d5ff,
    #e6cbff,
    #fac5d6,
    #fbe7ba,
    #c6e7dd,
    #b3d5ff
  );
  color: #fff;
  font-size: 24px;
  letter-spacing: 0;
}
.header-caption {
  color: #70809d;
  font-size: 9px;
  letter-spacing: 2.2px;
}
.site-header nav {
  display: flex;
  gap: 18px;
  align-items: center;
}
.quiet-button {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
  letter-spacing: 0.03em;
  padding: 10px 4px;
  min-height: 44px;
}
.motion-toggle {
  color: var(--muted);
  display: flex;
  gap: 7px;
  align-items: center;
}
.motion-toggle > span:first-child {
  font-size: 19px;
}
.motion-toggle[aria-pressed="true"] {
  color: #a16295;
}
.quiet-button:hover {
  color: #a16295;
}
.intro {
  text-align: center;
  padding: 28px 0 2px;
  z-index: 2;
  pointer-events: none;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 2.3px;
  color: var(--muted);
  margin: 0 0 12px;
  font-weight: 500;
}
.tiny-star {
  color: #ba8aa7;
  font-size: 15px;
  margin-right: 8px;
}
.intro h1 {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-weight: 500;
  font-size: clamp(24px, 3vw, 40px);
  letter-spacing: 0.12em;
  margin: 0 0 12px;
  line-height: 1.5;
}
.intro > p:last-child {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0;
  line-height: 1.8;
}
.scene {
  position: relative;
  isolation: isolate;
  min-height: 0;
  overflow: hidden;
}
.scene canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: manipulation;
}
.scene-caption {
  position: absolute;
  left: 2px;
  top: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: #aca2b3;
  font-size: 8px;
  letter-spacing: 2px;
  writing-mode: vertical-rl;
  transform: translateY(-50%);
  z-index: 2;
  pointer-events: none;
}
.scene-caption i {
  width: 1px;
  height: 35px;
  background: #c9bfcd;
}
.scene-bottom {
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: #958b9e;
  pointer-events: none;
}
.live-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #bf95ba;
  box-shadow: 0 0 0 4px #bf95ba12;
}
.ambient-orbit {
  position: absolute;
  left: 50%;
  top: 46%;
  width: min(60vw, 510px);
  height: 65%;
  border: 1px solid #bfb2ce0e;
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-15deg);
  box-shadow: 0 0 90px 30px #dfc5ed1a;
  z-index: -1;
  pointer-events: none;
}
#sceneMount,
.card-targets {
  position: absolute;
  inset: 0;
}
.card-targets {
  pointer-events: none;
}
.card-target {
  position: absolute;
  pointer-events: auto;
  border: 0;
  background: transparent;
  border-radius: 10px;
  transform: translate(-50%, -50%);
  color: transparent;
  padding: 0;
  touch-action: manipulation;
}
.card-target:focus-visible {
  outline: 2px solid #a67dbf;
  background: #dec8f322;
  outline-offset: 1px;
}
.card-target .target-number {
  position: absolute;
  top: calc(100% + 9px);
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  letter-spacing: 1px;
  color: #9787a3;
  transition: opacity 0.3s;
  pointer-events: none;
}
.card-target[data-selected="true"] .target-number {
  color: #ab6b90;
}
.card-target:disabled {
  cursor: default;
  opacity: 1;
}
.breath-cue {
  position: absolute;
  bottom: 30px;
  left: 0;
  right: 0;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s;
  color: #a18aab;
  font-size: 11px;
  letter-spacing: 0.15em;
}
.breath-cue p {
  margin: 0;
}
body[data-state="breathe"] .breath-cue {
  opacity: 1;
}
body[data-state="breathe"] .scene-bottom {
  opacity: 0;
}
body[data-state="dealing"] .scene-bottom,
body[data-state="revealing"] .scene-bottom,
body[data-state="reading"] .scene-bottom {
  display: none;
}
.ritual-dock {
  width: min(100%, 860px);
  margin: 0 auto;
  position: relative;
  z-index: 3;
}
.steps {
  list-style: none;
  padding: 0 18px;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.steps li {
  font-size: 10px;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #b2a9b6;
  white-space: nowrap;
}
.steps li span {
  font:
    10px Georgia,
    serif;
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  border: 1px solid #dcd1e2;
}
.steps li[aria-current="step"] {
  color: #8d5f88;
}
.steps li[aria-current="step"] span {
  border-color: #b896bf;
  background: #e9daef55;
}
.steps li.is-done {
  color: #a18ca9;
}
.guidance {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 21px 30px 23px;
  border: 1px solid #fff9;
  border-radius: 22px;
  background: linear-gradient(115deg, #ffffffa8, #fcf8ff99);
  box-shadow: 0 8px 35px #b39abd0d;
}
.dock-kicker {
  font-size: 8px;
  letter-spacing: 2px;
  color: #ae94b2;
  margin: 0 0 9px;
}
.guidance h2 {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.05em;
  margin: 0 0 8px;
  line-height: 1.5;
}
.guidance-copy > p:last-child {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
  line-height: 1.7;
}
.ritual-action {
  text-align: center;
  min-width: 228px;
}
.primary-button {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  width: 100%;
  border: 1px solid #d0b6d1;
  border-radius: 50px;
  background: linear-gradient(110deg, #f9f0f6, #f0e8fa);
  color: #705674;
  padding: 14px 24px;
  font-size: 12px;
  letter-spacing: 0.08em;
  box-shadow: 0 4px 15px #ba99c414;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
  min-height: 48px;
}
.primary-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px #ba99c433;
}
.primary-button:active:not(:disabled) {
  transform: translateY(0);
}
.primary-button > span {
  font-size: 18px;
  font-weight: 400;
}
.ritual-action > span {
  display: block;
  font-size: 9px;
  color: #aa9eaf;
  margin-top: 9px;
  letter-spacing: 0.03em;
}
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  font-size: 8px;
  letter-spacing: 1.5px;
  color: #7b88a2;
}
.site-footer > span:last-child {
  letter-spacing: 0.06em;
}
.reading {
  position: relative;
  border-top: 1px solid var(--line);
  padding: 0 18px 16px;
}
.reading-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}
.reading-tabs button {
  position: relative;
  padding: 12px 4px 10px;
  border: 0;
  border-bottom: 1px solid transparent;
  color: #a59aa9;
  background: none;
  font-size: 11px;
  letter-spacing: 0.1em;
  min-height: 44px;
}
.reading-tabs button[aria-selected="true"] {
  color: #85537f;
  border-color: #b484b4;
}
.reading-tabs button span {
  display: block;
  font-size: 9px;
  letter-spacing: 0;
  margin-top: 4px;
}
.reading-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}
.reading-panel h2 {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 19px;
  font-weight: 500;
  margin: 0 0 7px;
}
.reading-panel h2 .tag {
  font-family: sans-serif;
  margin-left: 9px;
  vertical-align: middle;
}
.reading-panel p {
  font-size: 12px;
  line-height: 1.7;
  margin: 0;
  color: var(--muted);
}
.detail-button {
  white-space: nowrap;
  color: #9d6a9a;
}
.restart-button {
  display: block;
  margin: 14px auto 0;
  border: 0;
  background: none;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #9d91a5;
  padding: 4px 14px;
  min-height: 32px;
}
.restart-button span {
  margin-left: 14px;
}
.tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 20px;
  background: #eee6f1;
  color: #8d7899;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.03em;
}
dialog {
  color: var(--ink);
  border: 1px solid #fff;
  border-radius: 24px;
  background: #fdfaf7;
  box-shadow: 0 24px 100px #51425e33;
  padding: 24px;
  max-height: 92vh;
  max-height: 92dvh;
  overscroll-behavior: contain;
}
dialog::backdrop {
  background: #322b46aa;
  backdrop-filter: blur(6px);
}
.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 12px;
}
.dialog-heading h2 {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 22px;
  font-weight: 500;
  margin: 0 0 8px;
}
.dialog-heading .eyebrow {
  font-size: 8px;
  letter-spacing: 1.5px;
}
.dialog-close {
  display: inline-grid;
  place-items: center;
  padding: 0;
  line-height: 1;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #eee6f1;
  color: #7a668b;
  font-size: 25px;
  border: 0;
}
.card-dialog {
  width: min(92vw, 610px);
  background: #fff9ee;
}
.dialog-artwork {
  display: flex;
  justify-content: center;
}
.dialog-artwork img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 56dvh;
  aspect-ratio: 5/7;
  object-fit: contain;
  border-radius: 10px;
}
.dialog-artwork img.is-reversed {
  transform: rotate(180deg);
}
.dialog-status {
  text-align: center;
  color: var(--muted);
  font-size: 10px;
  min-height: 12px;
  margin: 6px 0;
}
.dialog-actions {
  display: flex;
  justify-content: center;
}
.card-dialog[data-source="reading"] .dialog-actions {
  display: none;
}
.card-dialog .note {
  font-size: 15px;
  text-align: center;
  line-height: 1.8;
  margin: 0;
  color: var(--muted);
}
.catalog-dialog {
  width: min(94vw, 1040px);
}
.catalog-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 11px;
  margin: 18px 0 20px;
  color: var(--muted);
}
.catalog-toolbar select {
  font: inherit;
  padding: 9px;
  border-radius: 8px;
  border: 1px solid #ded4e5;
  background: #fffaf8;
  color: var(--ink);
  min-height: 40px;
}
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px 12px;
}
.catalog-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: #faf5ef;
  color: var(--ink);
  overflow: hidden;
}
.catalog-card img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 5/7;
}
.catalog-card span {
  display: block;
  font-size: 10px;
  padding: 9px 3px;
}
.catalog-card .catalog-label {
  display: grid;
  align-content: center;
  min-height: 44px;
  gap: 2px;
  padding: 7px 3px;
  line-height: 1.35;
}
.catalog-card .catalog-label > span {
  padding: 0;
  font-size: inherit;
  white-space: nowrap;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.noscript {
  position: fixed;
  inset: 30%;
  background: #fff;
  padding: 20px;
  z-index: 20;
}
.fallback-card {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 9px;
  border: 1px solid #bda4c5;
  background: radial-gradient(
    ellipse at 20% 10%,
    #e7b7ce,
    #bbb2e2 65%,
    #a4cdda
  );
  box-shadow: 0 8px 20px #7a619b22;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.fallback-card::before {
  content: "✧";
  border: 1px solid #fff8;
  position: absolute;
  inset: 7px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: #fff9;
  font-size: 30px;
}
.fallback-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff9ee;
  position: relative;
}
.fallback-face {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 8%;
  background: #fff9ee;
}
.fallback-face.is-reversed {
  transform: rotate(180deg);
}
.fallback-face-name {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  font-size: var(--face-label-size, 6px);
  line-height: 1;
  white-space: nowrap;
  color: #655570;
}
.fallback-deck {
  position: absolute;
  left: 50%;
  top: 45%;
  width: 125px;
  height: 180px;
  transform: translate(-50%, -50%) rotate(-10deg);
  border-radius: 12px;
  box-shadow:
    3px 3px #e4d9d9,
    5px 5px #c9b9cc,
    7px 7px #ecdfdf;
}
.fallback-deck .fallback-card {
  border-radius: 12px;
}
.fallback-cards {
  position: absolute;
  inset: 0;
}
@media (min-width: 1500px) {
  .intro {
    padding-top: 40px;
  }
  .guidance {
    padding-top: 25px;
    padding-bottom: 25px;
  }
}
@media (max-width: 760px) {
  .experience {
    grid-template-rows: 62px auto minmax(0, 1fr) auto 34px;
    padding: 0 20px;
  }
  .brand {
    font-size: 26px;
  }
  .brand-orbit {
    width: 26px;
    height: 26px;
    font-size: 21px;
  }
  .header-caption {
    display: none;
  }
  .site-header nav {
    gap: 12px;
  }
  .quiet-button {
    font-size: 10px;
  }
  .motion-label {
    display: none;
  }
  .motion-toggle {
    width: 30px;
    justify-content: center;
  }
  .intro {
    padding-top: 20px;
  }
  .intro h1 {
    font-size: 27px;
    letter-spacing: 0.09em;
    margin-bottom: 7px;
  }
  .intro > p:last-child {
    font-size: 10px;
    letter-spacing: 0.02em;
  }
  .eyebrow {
    font-size: 7px;
    letter-spacing: 1.7px;
    margin-bottom: 9px;
  }
  .scene-caption {
    display: none;
  }
  .scene-bottom {
    font-size: 8px;
    bottom: 10px;
    letter-spacing: 0.05em;
  }
  .ambient-orbit {
    width: 85%;
    height: 70%;
  }
  .steps {
    padding: 0 6px;
    margin-bottom: 11px;
  }
  .steps li {
    font-size: 8px;
    gap: 5px;
  }
  .steps li span {
    width: 18px;
    height: 18px;
    font-size: 8px;
  }
  .guidance {
    display: block;
    text-align: center;
    padding: 17px 17px 14px;
    border-radius: 20px;
  }
  .guidance h2 {
    font-size: 14px;
    margin-bottom: 6px;
  }
  .dock-kicker {
    font-size: 7px;
    margin-bottom: 6px;
    letter-spacing: 1.7px;
  }
  .guidance-copy > p:last-child {
    font-size: 10px;
    line-height: 1.6;
  }
  .ritual-action {
    min-width: 0;
    margin-top: 13px;
  }
  .primary-button {
    font-size: 11px;
    padding: 11px 16px;
    min-height: 44px;
    gap: 18px;
  }
  .ritual-action > span {
    margin-top: 7px;
    font-size: 8px;
  }
  .site-footer {
    font-size: 6px;
    letter-spacing: 0.9px;
  }
  .site-footer > span:last-child {
    font-size: 7px;
  }
  .reading {
    padding: 0 4px 6px;
  }
  .reading-tabs {
    gap: 9px;
    margin-bottom: 9px;
  }
  .reading-tabs button {
    font-size: 10px;
    padding: 9px 0 8px;
  }
  .reading-tabs button span {
    font-size: 8px;
  }
  .reading-panel {
    gap: 8px;
    min-height: 70px;
  }
  .reading-panel h2 {
    font-size: 17px;
    line-height: 1.7;
    margin-bottom: 3px;
  }
  .reading-panel p {
    font-size: 11px;
    line-height: 1.65;
  }
  .detail-button {
    font-size: 9px;
    min-width: 64px;
  }
  .restart-button {
    margin-top: 8px;
    font-size: 9px;
    min-height: 36px;
  }
  .catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 8px;
  }
  dialog {
    padding: 18px;
    border-radius: 20px;
  }
  .dialog-heading h2 {
    font-size: 19px;
  }
  .dialog-heading .eyebrow {
    font-size: 7px;
  }
  .card-dialog .note {
    font-size: 14px;
  }
  .catalog-card span {
    font-size: 9px;
  }
  .dialog-artwork img {
    max-height: 52dvh;
  }
  .breath-cue {
    bottom: 23px;
    font-size: 10px;
  }
}
@media (max-height: 700px) {
  .experience {
    grid-template-rows: 52px auto minmax(0, 1fr) auto 26px;
  }
  .intro {
    padding-top: 11px;
  }
  .intro h1 {
    font-size: 23px;
    margin-bottom: 3px;
  }
  .intro .eyebrow {
    margin-bottom: 6px;
  }
  .steps {
    margin-bottom: 8px;
  }
  .guidance {
    padding: 12px 16px;
  }
  .dock-kicker {
    display: none;
  }
  .ritual-action {
    margin-top: 9px;
  }
  .ritual-action > span {
    display: none;
  }
  .guidance h2 {
    margin-bottom: 4px;
  }
  .primary-button {
    padding: 9px 15px;
  }
  .scene-bottom {
    bottom: 5px;
  }
  .reading {
    padding-bottom: 0;
  }
  .reading-tabs {
    margin-bottom: 5px;
  }
  .reading-panel {
    min-height: 59px;
  }
  .reading-panel h2 {
    font-size: 15px;
  }
  .restart-button {
    margin-top: 3px;
    min-height: 32px;
  }
  .reading-tabs button {
    padding-top: 6px;
    padding-bottom: 6px;
    min-height: 38px;
  }
  .site-footer {
    font-size: 6px;
  }
}
@media (max-width: 360px) {
  .experience {
    padding: 0 14px;
  }
  .brand {
    font-size: 24px;
  }
  .site-header nav {
    gap: 6px;
  }
  .steps li {
    font-size: 7px;
  }
  .intro h1 {
    font-size: 24px;
  }
  .intro > p:last-child {
    font-size: 9px;
  }
  .guidance h2 {
    font-size: 13px;
  }
  .reading-panel p {
    font-size: 10px;
  }
}
@media (orientation: landscape) and (max-height: 520px) {
  .experience {
    height: auto;
    min-height: 100dvh;
    grid-template-rows: 48px auto minmax(240px, 1fr) auto 28px;
  }
  .intro {
    padding-top: 8px;
  }
  .intro .eyebrow {
    display: none;
  }
  .guidance {
    display: grid;
    grid-template-columns: 1fr auto;
    text-align: left;
  }
  .ritual-action {
    margin: 0;
    min-width: 230px;
  }
  .site-footer {
    font-size: 7px;
  }
}

@supports (padding: env(safe-area-inset-bottom)) {
  .experience {
    padding-bottom: env(safe-area-inset-bottom);
    padding-top: env(safe-area-inset-top);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
/* Match the deck: cream paper, clear navy outlines, coral robots and aqua. */
@media (max-width: 360px) {
  .intro h1 {
    font-size: 22px;
  }
}
@media (max-height: 700px) {
  body[data-state="reading"] .scene-bottom {
    display: none;
  }
}
.fallback-card {
  background: #fff4e4 var(--back-art) center/100% 100% no-repeat;
}
.fallback-card::before {
  display: none;
}
.fallback-card.is-active,
.fallback-card.is-hover {
  filter: drop-shadow(1px 0 4px #f2a8cd) drop-shadow(-1px 0 5px #8fcfe9);
}
.brand {
  font-family: "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif;
  font-size: 25px;
  letter-spacing: -1.4px;
  font-weight: 700;
}
.brand > span:last-child {
  color: #8c85b6;
}
.brand-orbit {
  width: 34px;
  height: 34px;
  border-radius: 0;
  background: none;
}
.brand-orbit svg {
  display: block;
  width: 100%;
  height: 100%;
}
.intro h1,
.reading-panel h2,
.dialog-heading h2 {
  font-family: "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif;
  font-weight: 600;
  letter-spacing: 0.055em;
}
.intro > p:last-child {
  color: #6b7c9b;
}
.tiny-star {
  color: #a17bb7;
}
.guidance {
  background: #fffcf7;
  border: 1px solid #27365d28;
  box-shadow: 0 5px 0 #e9dff044;
}
.guidance h2 {
  font-weight: 600;
}
.dock-kicker {
  color: #8f7caf;
}
.primary-button {
  background: #f7c4d7;
  border: 1.2px solid #425079;
  color: #29385f;
  box-shadow: 0 3px 0 #dcb6cf66;
  font-weight: 600;
}
.primary-button:hover:not(:disabled) {
  box-shadow: 0 5px 0 #dcb6cf66;
  background: #f9cee0;
}
.steps li {
  color: #7b87a1;
}
.steps li span {
  border-color: #b7bdce;
  color: #627291;
}
.steps li[aria-current="step"] {
  color: #2c466c;
}
.steps li[aria-current="step"] span {
  background: #bce5e4;
  border-color: #526387;
  color: #27365d;
}
.steps li.is-done {
  color: #677b91;
}
.quiet-button {
  color: #485e7e;
}
.reading-tabs button[aria-selected="true"] {
  color: #3d527e;
  border-color: #698db6;
}
.reading-tabs button[aria-selected="true"]::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 35%;
  right: 35%;
  height: 3px;
  border-radius: 9px;
  background: linear-gradient(90deg, #ec9cc5, #bcb0f4, #91dcd8);
}
.tag {
  background: #e4e8fa;
  color: #53658b;
}
.tag[data-orientation="upright"] {
  background: #f8dce8;
  color: #9b426b;
}
.dialog-close {
  background: #f7cadc;
  color: #33456c;
  border: 1px solid #7481a1;
}
.dialog-heading .eyebrow {
  color: #7988a6;
}
.scene-bottom {
  color: #7386a0;
}
.target-number {
  color: #65799b !important;
}
.motion-toggle[aria-pressed="true"] {
  color: #a05b8a;
}
.brand-orbit {
  margin-right: 8px;
}
@media (max-width: 760px) {
  .brand {
    font-size: 23px;
  }
  .brand-orbit {
    width: 30px;
    height: 30px;
  }
  .site-header {
    gap: 8px;
  }
  .site-header nav {
    gap: 4px;
  }
  .motion-toggle {
    width: 44px;
  }
  .intro h1 {
    font-weight: 600;
  }
  .intro > p:last-child {
    font-size: 11px;
  }
  .guidance {
    border-radius: 17px;
  }
  .guidance-copy > p:last-child {
    font-size: 11px;
  }
  .quiet-button {
    font-size: 10px;
  }
}
@media (orientation: landscape) and (max-height: 520px) {
  .experience {
    height: 100dvh;
    min-height: 320px;
    grid-template-columns: minmax(0, 1fr) 310px;
    grid-template-rows: 45px 58px minmax(0, 1fr) 23px;
    column-gap: 24px;
  }
  .site-header {
    grid-column: 1/-1;
  }
  .intro {
    grid-column: 1/-1;
    padding: 4px 0 0;
  }
  .intro h1 {
    font-size: 20px;
    margin: 0;
  }
  .intro > p:last-child {
    font-size: 9px;
  }
  .scene {
    grid-column: 1;
    grid-row: 3;
  }
  .ritual-dock {
    grid-column: 2;
    grid-row: 3;
    align-self: center;
  }
  .site-footer {
    grid-column: 1/-1;
    grid-row: 4;
  }
  .guidance {
    display: block;
    text-align: center;
    padding: 12px;
  }
  .guidance h2 {
    font-size: 12px;
  }
  .guidance-copy > p:last-child {
    font-size: 9px;
  }
  .ritual-action {
    min-width: 0;
    margin-top: 10px;
  }
  .steps {
    padding: 0;
    margin-bottom: 9px;
  }
  .steps li {
    font-size: 7px;
    gap: 4px;
  }
  .steps li span {
    width: 16px;
    height: 16px;
  }
  .reading-panel {
    min-height: 64px;
  }
  .reading-tabs {
    gap: 7px;
    margin-bottom: 8px;
  }
  .reading-tabs button {
    font-size: 9px;
  }
  .reading-panel h2 {
    font-size: 13px;
  }
  .reading-panel p {
    font-size: 10px;
  }
  .restart-button {
    font-size: 8px;
  }
  .scene-bottom {
    font-size: 7px;
  }
  .breath-cue {
    font-size: 8px;
  }
  .scene-caption {
    display: none;
  }
}

/* Keep names intact and all controls reachable on small touch screens. */
.reading-tabs button > span .card-name-part {
  display: inline-block;
  margin: 0;
  font: inherit;
  white-space: nowrap;
}
.reading-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 12px;
  row-gap: 4px;
}
.reading-panel > div {
  display: contents;
}
.reading-panel h2 {
  grid-column: 1 / -1;
  word-break: keep-all;
}
.reading-panel h2 .tag {
  white-space: nowrap;
}
.reading-panel p {
  min-width: 0;
}
.detail-button {
  grid-column: 2;
  grid-row: 2;
  white-space: nowrap;
}
.reading-tabs button,
.restart-button,
.dialog-close,
.brand {
  min-height: 44px;
}
.dialog-close {
  min-width: 44px;
  height: 44px;
}
.primary-button {
  white-space: nowrap;
}
body[data-state="choosing"] .scene[data-choice-layout="grid"] .scene-bottom {
  display: none;
}
.card-dialog[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  gap: 8px;
  height: min(92dvh, 850px);
  overflow: auto;
}
.card-dialog .dialog-heading {
  margin: 0;
  min-width: 0;
  gap: 10px;
}
.card-dialog .dialog-heading > div {
  min-width: 0;
}
.card-dialog-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
#cardDialogPosition {
  flex-shrink: 0;
  white-space: nowrap;
}
#cardDialogTitle {
  margin: 0;
  min-width: 0;
  font-size: clamp(16px, 4.2vw, 22px);
  letter-spacing: 0.025em;
  line-height: 1.45;
  word-break: normal;
  overflow-wrap: anywhere;
}
.card-dialog .dialog-artwork {
  min-height: 0;
  overflow: hidden;
}
.card-dialog .dialog-artwork img {
  width: auto;
  height: 100%;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}
.dialog-status {
  margin: 0;
}
.dialog-status:empty {
  display: none;
}
@media (max-width: 760px) {
  .experience {
    min-height: min(500px, 100dvh);
  }
  .reading-panel {
    column-gap: 10px;
  }
  .reading-panel h2 {
    margin-bottom: 0;
  }
  .catalog-toolbar select {
    font-size: 16px;
    min-height: 44px;
    max-width: 100%;
  }
  .catalog-toolbar {
    flex-wrap: wrap;
    gap: 8px;
  }
}
@media (orientation: landscape) and (max-height: 520px) {
  .experience {
    grid-template-columns: minmax(0, 1fr) min(46vw, 310px);
    column-gap: 16px;
  }
  .reading-tabs button {
    padding-block: 5px;
  }
  .reading-panel {
    row-gap: 2px;
  }
  .reading-panel h2 {
    font-size: 14px;
  }
  .restart-button {
    margin-top: 2px;
  }
  .card-dialog[open] {
    width: min(94vw, 850px);
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    column-gap: 20px;
    row-gap: 6px;
  }
  .card-dialog .dialog-artwork {
    grid-column: 1;
    grid-row: 1 / -1;
  }
  .card-dialog .dialog-heading {
    grid-column: 2;
    grid-row: 1;
  }
  .card-dialog .dialog-status {
    grid-column: 2;
    grid-row: 2;
  }
  .card-dialog .dialog-actions {
    grid-column: 2;
    grid-row: 3;
  }
  .card-dialog .note {
    grid-column: 2;
    grid-row: 4;
    align-self: end;
  }
  #cardDialogTitle {
    font-size: clamp(14px, 2.5vw, 20px);
  }
  .card-dialog .dialog-heading .eyebrow {
    font-size: 6px;
    letter-spacing: 1px;
  }
}
@media (orientation: landscape) and (max-width: 640px) {
  body[data-state="choosing"] .scene-bottom {
    display: none;
  }
}
@supports (padding: env(safe-area-inset-left)) {
  .experience {
    --page-gutter: clamp(18px, 4vw, 64px);
    padding-left: max(var(--page-gutter), env(safe-area-inset-left));
    padding-right: max(var(--page-gutter), env(safe-area-inset-right));
  }
  @media (max-width: 760px) {
    .experience {
      --page-gutter: 20px;
    }
  }
  @media (max-width: 360px) {
    .experience {
      --page-gutter: 14px;
    }
  }
}

/* Optical centering trims the unused advance of terminal Japanese marks. */
.optical-ending {
  display: inline-block;
  white-space: nowrap;
  margin-inline-end: -0.5em;
}
.optical-ending.optical-wide-mark {
  margin-inline-end: -0.25em;
}
.reading-panel {
  display: block;
  min-height: 0;
}
.reading-panel > div {
  display: block;
}
.reading-panel h2 {
  margin-bottom: 6px;
}
.reading-panel p {
  width: 100%;
  text-wrap: balance;
  line-break: strict;
}
.card-dialog .note,
.guidance-copy > p:last-child {
  text-wrap: balance;
  line-break: strict;
}
.reading-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
}
.reading-actions .restart-button {
  margin: 0;
}
.reading-actions .detail-button {
  flex-shrink: 0;
}
.fallback-deck {
  width: auto;
  height: min(180px, calc(100% - 36px));
  aspect-ratio: 125 / 180;
}
@media (max-width: 360px) {
  .intro h1 {
    font-size: clamp(18px, 6.8vw, 22px);
  }
}
@media (orientation: landscape) and (max-height: 520px) {
  .reading-panel h2 {
    margin-bottom: 4px;
  }
  .reading-actions {
    margin-top: 2px;
  }
}

/* Keep the ritual functional: a single heading and only the current guidance. */
.experience {
  grid-template-rows: 76px auto minmax(0, 1fr) auto;
  padding-bottom: max(20px, env(safe-area-inset-bottom));
}
.intro {
  padding-top: 20px;
  padding-bottom: 0;
}
.intro h1 {
  margin-bottom: 0;
}
.guidance.action-only {
  display: flex;
  justify-content: center;
  background: none;
  border-color: transparent;
  box-shadow: none;
}
.guidance.action-only .ritual-action {
  margin-top: 0;
}
@media (max-width: 760px) {
  .experience {
    grid-template-rows: 62px auto minmax(0, 1fr) auto;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
  .intro {
    padding-top: 18px;
  }
  .guidance-copy h2 {
    margin-bottom: 0;
  }
  .guidance-copy p:not([hidden]) {
    margin-top: 7px;
  }
  .reading {
    padding-bottom: 0;
  }
}
@media (max-height: 700px) {
  .experience {
    grid-template-rows: 52px auto minmax(0, 1fr) auto;
  }
  .intro {
    padding-top: 10px;
  }
}
@media (orientation: landscape) and (max-height: 520px) {
  .experience {
    grid-template-rows: 45px 42px minmax(0, 1fr);
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }
  .intro {
    padding-top: 4px;
  }
}

/* Hide only paint while typing: full layout and accessible text stay in place. */
.typing-char.is-pending {
  color: transparent !important;
  text-shadow: none !important;
}
[data-typing="true"] {
  cursor: pointer;
}
dialog::backdrop {
  opacity: 1;
  transition: opacity 180ms ease;
}
dialog[data-window-phase="opening"]::backdrop,
dialog[data-window-phase="closing"]::backdrop {
  opacity: 0;
}
html[data-motion-reduced="true"] dialog::backdrop {
  transition: none;
}
@media (prefers-reduced-motion: reduce) {
  dialog::backdrop {
    transition: none;
  }
}

/* Keep the crawlable guide link on one line without shrinking touch controls. */
.site-header nav > * {
  flex-shrink: 0;
  white-space: nowrap;
}
.guide-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
}
@media (max-width: 360px) {
  .site-header { gap: 6px; }
  .site-header nav { gap: 2px; }
  .brand { font-size: 20px; }
  .brand-orbit { width: 26px; height: 26px; margin-right: 6px; }
}
