.fortune-page { background: #fcf7fc; --journey-color: #76506d; }
.fortune-container { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.fortune-breadcrumb { display: flex; gap: 12px; flex-wrap: wrap; padding-top: 24px; font-size: .875rem; color: var(--muted); }
.fortune-breadcrumb a { text-decoration: underline; text-underline-offset: 4px; }
.fortune-hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 50px; align-items: center; padding: 54px 0 64px; }
.fortune-eyebrow { font-size: .8125rem; letter-spacing: .15em; color: #86617d; font-weight: 600; }
.fortune-hero h1 { font-family: var(--sans); font-size: clamp(2.1rem, 3.8vw, 3.3rem); font-weight: 700; line-height: 1.5; letter-spacing: .025em; margin: 18px 0 12px; }
.fortune-subtitle { font-size: 1.25rem; font-weight: 600; color: #76506d; }
.fortune-intro { max-width: 33em; margin-top: 17px; font-size: 1rem; line-height: 1.9; color: #5d5366; }
.fortune-board { display: flex; align-items: center; justify-content: center; gap: 16px; border: 0; border-radius: 999px; padding: 16px 26px; min-height: 60px; margin-top: 26px; background: #76506d; color: #fff; font-size: 1.0625rem; font-weight: 600; box-shadow: 0 5px 0 #54384f; }
.fortune-board img { width: 27px; filter: brightness(0) invert(1); }
.fortune-board:hover { background: #62415a; }
.fortune-board:disabled { opacity: .75; cursor: wait; }
.fortune-daily-note { font-size: .8125rem; color: #746779; margin-top: 15px; }
.fortune-platform { position: relative; border: 1px solid #dac4d6; border-radius: 22px; overflow: hidden; background: #f8efdf; box-shadow: 0 14px 36px #6b476813; }
.platform-board { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 19px 24px; background: #fffaf5; border-bottom: 1px solid #e9dbd9; font-size: .875rem; }
.platform-board strong { font-weight: 600; color: #76506d; }
.platform-board time { color: #746779; font-variant-numeric: tabular-nums; }
.platform-landscape { position: relative; height: 220px; overflow: hidden; background: linear-gradient(#f5eafb, #fbf5e9); }
.platform-landscape svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.platform-sign { position: absolute; left: 26px; top: 24px; background: #fffcf4ed; padding: 9px 15px; border: 1px solid #ccb7c8; border-radius: 5px; color: #76506d; font-size: .8125rem; z-index: 1; }
.platform-sign small { display: block; font-size: .625rem; letter-spacing: .18em; margin-top: 2px; }
.platform-track { position: absolute; bottom: 24px; height: 10px; left: 0; right: 0; border-block: 2px solid #a18a9c; background: repeating-linear-gradient(90deg, transparent 0 13px, #bba3b3 13px 16px); }
.platform-train { position: absolute; height: 66px; width: auto; max-width: none; bottom: 33px; left: 0; opacity: 0; }
.platform-caption { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; padding: 15px 24px; font-size: .875rem; color: #746779; background: #fffaf5; }
.platform-caption span:last-child { font-size: .6875rem; letter-spacing: .14em; align-self: center; }
.fortune-status { min-height: 1.8em; color: #76506d; font-size: .875rem; margin-top: 15px; }
.fortune-result { scroll-margin-top: 135px; margin-bottom: 60px; }
.fortune-ticket { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 230px; background: #fffdf8; border: 1px solid #dec9d6; border-radius: 18px; box-shadow: 0 8px 30px #76506d0b; }
.fortune-ticket-main { padding: 34px 40px; }
.fortune-ticket-top { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between; color: #86617d; font-size: .8125rem; }
.fortune-special { background: #f7e6be; padding: 4px 12px; border-radius: 999px; color: #7c612d; font-size: .8125rem; font-weight: 600; }
.fortune-result h2 { margin: 17px 0 10px; color: var(--journey-color); font-size: clamp(2rem, 4vw, 3rem); line-height: 1.4; font-weight: 700; }
.fortune-result h2 small { display: block; color: #5d5366; font-size: 1rem; margin-bottom: 10px; font-weight: 400; }
.fortune-theme { font-size: 1.375rem; line-height: 1.7; font-weight: 700; margin-bottom: 12px; }
.fortune-body { font-size: 1.0625rem; line-height: 1.9; }
.fortune-ticket-stub { position: relative; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 15px; padding: 28px 18px; border-left: 1px dashed #c8aebe; text-align: center; background: #f8eff5; border-radius: 0 18px 18px 0; }
.fortune-ticket-stub::before, .fortune-ticket-stub::after { content: ''; position: absolute; width: 22px; height: 22px; border: 1px solid #dec9d6; background: #fcf7fc; border-radius: 50%; left: -12px; }
.fortune-ticket-stub::before { top: -12px; }.fortune-ticket-stub::after { bottom: -12px; }
.fortune-ticket-stub > img { width: 100%; height: 58px; object-fit: contain; }
.fortune-ticket-stub > p { font-size: .875rem; color: #76506d; }
.fortune-ticket-stub .ticket-serial { font-size: .75rem; letter-spacing: .13em; color: #89768a; }
.fortune-stations { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-top: 25px; }
.fortune-station { padding: 24px; border-top: 3px solid #c6a4b9; border-radius: 3px 3px 12px 12px; background: #fffafd; }
.fortune-station:nth-child(2) { border-color: #aeb8ce; }.fortune-station:nth-child(3) { border-color: #afbea2; }
.fortune-station h3 { font-size: 1.0625rem; color: #76506d; margin-bottom: 12px; }
.fortune-station h3 span { margin-right: 8px; }.fortune-station p { font-size: 1rem; line-height: 1.9; }
.daily-rail-ticket { display: flex; align-items: center; gap: 24px; margin-top: 24px; background: #f2e6ee; border: 1px solid #ddc8d6; padding: 25px 32px; border-radius: 12px; }
.daily-rail-ticket h3 { white-space: nowrap; font-size: .9375rem; color: #76506d; }.daily-rail-ticket p { font-size: 1.1875rem; font-weight: 600; line-height: 1.7; }
.conductor-note { margin-top: 27px; padding: 0 10px; display: grid; grid-template-columns: 54px 1fr; gap: 20px; }
.conductor-icon { width: 54px; height: 54px; padding: 12px; border-radius: 50%; background: #f1e4ee; }
.conductor-note h3 { font-size: .875rem; color: #86617d; margin-bottom: 9px; }.conductor-note p { font-size: 1.0625rem; line-height: 1.9; }
.stamp-card { background: #fffcf6; padding: 34px 38px; border: 1px solid #e0d2c6; border-radius: 18px; margin: 0 0 54px; }
.stamp-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; }.stamp-heading h2 { font-size: 1.5rem; margin: 7px 0 10px; }.stamp-heading p:last-child { font-size: 1rem; color: #6d6270; }.stamp-count { font-size: 2rem; color: #86617d; white-space: nowrap; }.stamp-count small { font-size: .875rem; color: #807481; }
.stamp-slots { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 15px; list-style: none; padding: 0; margin: 27px 0 20px; }
.stamp-slots li { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; aspect-ratio: 1; border: 1px dashed #cbbaca; border-radius: 50%; color: #b9a9b6; background: #fcf7f1; }
.stamp-slots li.filled { color: #86617d; border: 2px solid #ad7c9a; box-shadow: inset 0 0 0 4px #fffcf6, inset 0 0 0 5px #c29ab1; background: #f8eaf2; }
.stamp-slots li.filled:nth-child(even) { transform: rotate(5deg); }.stamp-slots li.filled:nth-child(odd) { transform: rotate(-5deg); }
.stamp-slots img { width: 29px; height: 29px; opacity: .9; }.stamp-slots time { font-size: .75rem; font-variant-numeric: tabular-nums; margin-top: 2px; }.stamp-slots .stamp-label { font-size: .625rem; letter-spacing: .12em; }.stamp-slots .empty-number { font-size: 1.1rem; }
.stamp-footer { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: 16px; }.stamp-note { font-size: .8125rem; color: #796d7c; }.stamp-storage-message { color: #76506d; font-size: .875rem; margin-top: 8px; }
.commemorative-button { min-height: 48px; padding: 9px 18px; border: 1px solid #b894ab; border-radius: 9px; color: #76506d; font-weight: 600; background: #fff8fc; }
.fortune-lineup { margin-bottom: 50px; }.fortune-lineup > h2 { font-size: 1.5rem; margin-bottom: 25px; }.fortune-lineup > p { font-size: 1rem; color: #746779; margin: -12px 0 25px; }
.train-lineup { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 30px; }
.train-lineup li { padding: 20px 0; border-top: 1px solid #e1d3df; }.train-lineup img { width: 100%; max-width: 200px; height: 48px; object-fit: contain; object-position: left; margin-bottom: 14px; }.train-lineup h3 { font-size: 1.0625rem; margin-bottom: 4px; }.train-lineup p { font-size: .875rem; color: #746779; }
.fortune-about { border-top: 1px solid #dfd0dc; padding: 28px 0 50px; font-size: .875rem; line-height: 1.9; color: #746779; }.fortune-about p + p { margin-top: 8px; }.fortune-about a { text-decoration: underline; text-underline-offset: 4px; }
.commemorative-dialog { border: 1px solid #d4b7c9; border-radius: 16px; background: #fcf7fc; color: #363344; width: min(660px, calc(100% - 28px)); padding: 28px; max-height: 90dvh; overflow: auto; }.commemorative-dialog::backdrop { background: #37243f99; }.commemorative-dialog .dialog-close { display: block; margin-left: auto; font-size: 28px; width: 44px; height: 44px; }.commemorative-dialog h2 { font-size: 1.5rem; margin-bottom: 20px; }.commemorative-dialog > p { font-size: .875rem; margin-top: 18px; }.souvenir-ticket { padding: 28px; border: 2px solid #ad7d9b; background: #fffaf1; text-align: center; border-radius: 12px; }.souvenir-ticket > p { font-size: .8125rem; letter-spacing: .14em; color: #86617d; }.souvenir-ticket h3 { font-size: 1.6rem; line-height: 1.7; margin: 16px 0; }.souvenir-ticket img { width: min(300px, 100%); height: 70px; margin: 10px auto; object-fit: contain; }.souvenir-ticket time { font-size: .875rem; }.souvenir-ticket .souvenir-route { letter-spacing: 0; font-size: 1.0625rem; margin: 12px 0; }.souvenir-download { display: inline-flex; justify-content: center; margin-top: 20px; min-height: 48px; padding: 10px 20px; border-radius: 8px; background: #76506d; color: #fff; font-size: 1rem; }
@media(max-width: 800px) {
  .fortune-container { width: calc(100% - 40px); }.fortune-hero { grid-template-columns: 1fr; gap: 26px; padding: 34px 0 35px; }.fortune-hero h1 { font-size: clamp(2rem, 7.8vw, 3rem); }.fortune-board { width: 100%; }.fortune-platform { max-width: 560px; width: 100%; justify-self: center; }.platform-landscape { height: 180px; }
  .fortune-ticket { grid-template-columns: minmax(0, 1fr); }.fortune-ticket-main { padding: 26px; }.fortune-ticket-stub { border-left: 0; border-top: 1px dashed #c8aebe; border-radius: 0 0 18px 18px; padding: 18px; flex-direction: row; flex-wrap: wrap; gap: 10px 22px; }.fortune-ticket-stub > img { width: min(220px, 70%); height: 42px; }.fortune-ticket-stub::before, .fortune-ticket-stub::after { display: none; }.fortune-stations { grid-template-columns: 1fr; gap: 13px; }.fortune-station { padding: 20px 23px; }.daily-rail-ticket { flex-direction: column; gap: 10px; align-items: start; padding: 22px; }.conductor-note { gap: 15px; padding: 0; }
  .stamp-card { padding: 26px 22px; }.stamp-slots { gap: 9px; grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 440px; margin-inline: auto; }.stamp-heading { gap: 10px; }.stamp-heading h2 { font-size: 1.3rem; }.stamp-count { font-size: 1.6rem; }.train-lineup { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }.train-lineup img { height: 42px; }.fortune-result { scroll-margin-top: 115px; }
}
@media(max-width: 390px) { .fortune-container { width: calc(100% - 30px); }.fortune-hero h1 { font-size: 1.9rem; }.fortune-subtitle { font-size: 1.0625rem; }.platform-board { padding: 15px; gap: 8px; font-size: .8125rem; }.fortune-ticket-main { padding: 23px 20px; }.stamp-card { padding: 23px 17px; }.stamp-heading { flex-wrap: wrap; }.stamp-slots img { width: 23px; height: 23px; }.stamp-slots .stamp-label { font-size: .5625rem; }.stamp-slots time { font-size: .6875rem; }.train-lineup { grid-template-columns: 1fr; }.train-lineup li { display: grid; grid-template-columns: 125px 1fr; column-gap: 15px; align-items: center; }.train-lineup img { grid-row: span 2; margin: 0; }.train-lineup p { font-size: .8125rem; } }
@media(prefers-reduced-motion: reduce) { .stamp-slots li.filled { transform: none; } }

/* Keep this feature self-contained beside the separate MoriMori fortune. */
.ellie-fortune-page { color: #363344; font-size: 16px; }
.ellie-fortune-page [hidden] { display: none !important; }
.ellie-fortune-page h1, .ellie-fortune-page h2, .ellie-fortune-page h3 { letter-spacing: .015em; }
.ellie-fortune-page .fortune-hero h1, .ellie-fortune-page .fortune-theme { color: #363344; }
.ellie-fortune-page .platform-landscape svg { stroke: none; }
.ellie-fortune-page .commemorative-dialog { margin: auto; }
.ellie-fortune-page .commemorative-dialog .dialog-close { background: transparent; padding: 0; }
.stamp-transfer-notice { margin-top: 24px; padding: 15px 20px; border-radius: 10px; background: #f1e4ee; color: #76506d; font-size: .875rem; }
.ellie-fortune-page .fortune-breadcrumb { line-height: 1.8; }
@media (max-width: 600px) { .ellie-fortune-page .story-home-link { font-size: 11px; white-space: normal; max-width: 9em; text-align: right; } }

/* Ticket cursor: 32px artwork with its click point at the center. */
.ellie-fortune-page a[href],
.ellie-fortune-page button:not(:disabled) {
  cursor: url("/assets/ellie-fortune/ticket-cursor.png") 16 16, pointer;
}

/* Railway-first, pseudonymous guide; keep the established plum ticket palette. */
.fortune-service-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.fortune-service-tags span { font-size: .75rem; padding: 4px 10px; border: 1px solid #dcc7d5; border-radius: 5px; color: #76506d; background: #fffaf5; }
.fortune-luck { display: inline-block; padding: 5px 13px; margin: 4px 0 16px; border: 1px solid #d5bd83; background: #fbefcd; border-radius: 5px; color: #775718; font-size: .9375rem; font-weight: 700; }
.fortune-station .rail-word { color: #594a63; font-size: 1.25rem; font-weight: 700; line-height: 1.55; margin-bottom: 12px; overflow-wrap: anywhere; }
.rail-source { display: inline-block; margin-top: 14px; color: #76506d; font-size: .8125rem; line-height: 1.7; text-decoration: underline; text-underline-offset: 4px; }
.conductor-mystery { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: #f1e4ee; color: #76506d; font-family: Georgia, serif; font-size: 2rem; font-style: italic; border: 1px dashed #b690a9; }
.ellie-mystery { display: flex; gap: 24px; align-items: center; margin-bottom: 45px; padding: 28px; background: #f4eaf1; border-radius: 16px; }
.ellie-mystery > span { flex: 0 0 70px; font-family: Georgia, serif; font-size: 4rem; font-style: italic; color: #95748c; text-align: center; }
.ellie-mystery h2 { font-size: 1.25rem; margin: 8px 0 12px; }
.ellie-mystery p { line-height: 1.9; }
.ellie-mystery small { display: block; margin-top: 10px; color: #766677; font-size: .75rem; }
.ellie-fortune-page :is(a, button):focus-visible { outline: 3px solid #76506d; outline-offset: 5px; }
@media (max-width: 600px) { .ellie-mystery { gap: 14px; padding: 22px; align-items: start; }.ellie-mystery > span { flex-basis: 32px; font-size: 3rem; }.ellie-mystery h2 { font-size: 1.1rem; }.ellie-mystery p { font-size: .9375rem; }.daily-rail-ticket h3 { white-space: normal; } }

/* Twelve distinct train characters, with space for longer Japanese names. */
.fortune-lineup { scroll-margin-top: 115px; }
.fortune-lineup-jump { margin-top: 12px; font-size: .875rem; color: #76506d; }
.fortune-lineup-jump a { text-decoration: underline; text-underline-offset: 4px; }
.train-lineup h3 small { display: inline-block; margin-right: 7px; color: #a28297; font-size: .75rem; font-variant-numeric: tabular-nums; }
.train-lineup .lineup-luck { color: #76506d; font-size: .8125rem; font-weight: 700; margin: 6px 0; }
.fortune-result h2 { overflow-wrap: anywhere; }
@media (min-width: 1000px) { .train-lineup { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 26px; }.train-lineup h3 { font-size: 1rem; } }
@media (max-width: 390px) { .train-lineup img { grid-row: span 3; width: 125px; }.train-lineup li { grid-template-columns: minmax(0, 100px) minmax(0, 1fr); }.train-lineup img { width: 100%; } }
