/* 年の扉(年末年始の特番)。このページだけで読み込む */
.is-tobira { --night: #2B3150; --night-2: #353D5C; --night-ink: #F1EBDD; --night-soft: #C9C2B4; --candle: #E8C877; background: var(--paper); }
.is-tobira .site-header, .is-tobira .moon-banner { display: none; }
.is-tobira main { overflow-x: clip; }
.is-tobira [hidden], .is-tobira-sign [hidden] { display: none !important; }
.is-tobira .b-text { color: var(--ink); }
.tb-s3 .b-who, .tb-s4 .b-who { color: var(--gold-soft); }
.tb-s3 .tb-card .b-who { color: var(--c); }
.tb-s0-text { text-shadow: 0 1px 10px rgba(30, 34, 56, .75); }

/* 上の帯：館の入口へ・音 */
.tb-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 60; display: flex; justify-content: space-between; align-items: center; padding: calc(10px + env(safe-area-inset-top)) 12px 0; pointer-events: none; }
.tb-bar > * { pointer-events: auto; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border: 1px solid rgba(216, 200, 164, .55); border-radius: 17px; background: rgba(43, 49, 80, .78); color: var(--night-ink); font: 500 13px/1 var(--gothic); letter-spacing: .08em; text-decoration: none; cursor: pointer; }
.tb-sound-icon { width: 14px; height: 14px; display: inline-block; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 6h3l4-3v10l-4-3H2z'/%3E%3Cpath d='M11 5l4 6M15 5l-4 6' stroke='%23000' stroke-width='1.4'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 6h3l4-3v10l-4-3H2z'/%3E%3Cpath d='M11 5l4 6M15 5l-4 6' stroke='%23000' stroke-width='1.4'/%3E%3C/svg%3E") center/contain no-repeat; }
.tb-sound[aria-pressed="true"] .tb-sound-icon { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 6h3l4-3v10l-4-3H2z'/%3E%3Cpath d='M11 5.5a4 4 0 0 1 0 5M13 3.5a7 7 0 0 1 0 9' fill='none' stroke='%23000' stroke-width='1.4'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 6h3l4-3v10l-4-3H2z'/%3E%3Cpath d='M11 5.5a4 4 0 0 1 0 5M13 3.5a7 7 0 0 1 0 9' fill='none' stroke='%23000' stroke-width='1.4'/%3E%3C/svg%3E"); }

.tb-scene { position: relative; }
.is-tobira .plate-lead { line-height: 1.8; }
.tb-night { background: var(--night); color: var(--night-ink); }

/* 場面0 丘の上の館 */
.tb-s0 { min-height: 100vh; min-height: 100svh; background: #424B67; overflow: hidden; display: flex; justify-content: center; }
.tb-s0-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 70%; }
@media (min-aspect-ratio: 4/5) {
  .tb-s0-bg { left: 50%; width: auto; max-width: none; transform: translateX(-50%); object-fit: contain; -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); }
}
.tb-snow { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.tb-s0-text { position: relative; z-index: 2; text-align: center; color: var(--night-ink); padding: calc(78px + env(safe-area-inset-top)) 20px 0; max-width: 560px; }
.tb-s0-en { margin: 0; font: italic 500 15px/1.4 var(--latin); letter-spacing: .3em; color: var(--gold-soft); }
.tb-s0-title { margin: 6px 0 4px; font: 700 40px/1.3 var(--mincho); letter-spacing: .24em; }
.tb-s0-title span { font-family: var(--latin); font-weight: 500; letter-spacing: .12em; }
.tb-s0-sub { margin: 0 0 4px; font: 500 17px/1.8 var(--mincho); letter-spacing: .16em; }
.tb-s0-lead { margin: 0 0 26px; font-size: 13.5px; color: var(--night-soft); }
.tb-open { padding: 13px 38px; border: 1px solid var(--gold-soft); border-radius: 2px; background: rgba(43, 49, 80, .55); color: var(--night-ink); font: 500 17px/1 var(--mincho); letter-spacing: .4em; text-indent: .4em; cursor: pointer; transition: background .3s; }
.tb-open:hover { background: rgba(43, 49, 80, .85); }
.tb-s0-note { margin: 12px 0 0; font-size: 11.5px; color: var(--night-soft); }
.tb-scroll-cue { position: absolute; z-index: 2; left: 50%; bottom: 18px; width: 1px; height: 40px; background: var(--gold-soft); animation: tbCue 2.4s ease-in-out infinite; }
@keyframes tbCue { 0%, 100% { opacity: .2; transform: scaleY(.4); transform-origin: top; } 50% { opacity: .9; transform: scaleY(1); } }
@media (max-width: 560px) { .tb-s0-title { font-size: 32px; } .tb-s0-text { padding-top: calc(64px + env(safe-area-inset-top)); } }

/* 場面1 扉がひらく(スクロールで進む。--p は 0〜1) */
.tb-door { height: 260vh; background: #2B3150; }
.tb-door-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; perspective: 1400px; }
.tb-hall { position: absolute; inset: 0; background-size: cover; background-position: center 30%; transform-origin: 50% 22%; transform: scale(calc(1 + var(--hz, 0) * .16)); }
.tb-leaf { position: absolute; top: 0; bottom: 0; width: 50%; overflow: hidden; will-change: transform; }
.tb-leaf > span { position: absolute; top: 0; bottom: 0; width: 200%; background-size: cover; background-position: center 60%; background-repeat: no-repeat; }
.tb-leaf-l { left: 0; transform-origin: 0 50%; transform: rotateY(calc(var(--dp, 0) * 82deg)); }
.tb-leaf-l > span { left: 0; }
.tb-leaf-r { right: 0; transform-origin: 100% 50%; transform: rotateY(calc(var(--dp, 0) * -82deg)); }
.tb-leaf-r > span { right: 0; }
.tb-leaf { opacity: calc(1 - var(--dp, 0) * var(--dp, 0)); }
.tb-welcome { position: absolute; left: 0; right: 0; bottom: calc(22px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; }
.tb-welcome .b-row { opacity: 0; transform: translateY(14px); transition: opacity .9s, transform .9s; cursor: default; }
.tb-welcome .b-text { background: rgba(255, 253, 248, .94); font-size: 15px; }
.tb-welcome .b-who { color: #fff; }
.tb-door.is-greet .tb-welcome .b-row { opacity: 1; transform: none; }
.tb-door.is-greet .tb-welcome .b-row:nth-child(2) { transition-delay: 1.2s; }
.tb-door.is-greet .tb-welcome .b-row:nth-child(3) { transition-delay: 2.4s; }

/* 場面2 総論 */
.tb-s2 { padding-top: 56px; padding-bottom: 10px; }
.tb-souron-h { margin: 0 0 6px; font-size: 23px; letter-spacing: .1em; line-height: 1.6; }
.tb-by { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font-size: 13px; color: var(--ink-soft); }
.tb-souron .prose p { font-family: var(--mincho); font-size: 16.5px; line-height: 2.1; }

/* 空の暦(横にめくる) */
.tb-sky { background: var(--night); color: var(--night-ink); padding: 44px 0 30px; margin-top: 40px; }
.tb-sky .plate-ja { color: var(--night-ink); }
.tb-sky .plate-lead { color: var(--night-soft); }
.tb-sky-track { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px max(18px, calc(50vw - 502px)) 18px; scrollbar-width: thin; scrollbar-color: var(--gold) transparent; outline: none; }
.tb-sky-card { flex: 0 0 248px; scroll-snap-align: center; padding: 16px 18px 18px; border: 1px solid rgba(216, 200, 164, .35); background: var(--night-2); border-radius: 2px; }
.tb-sky-card.is-main { border-color: var(--candle); flex-basis: 268px; }
.tb-glyph { display: block; width: 64px; height: 64px; margin: 0 0 6px; }
.tb-sky-date { margin: 0; font: 500 13px/1.5 var(--mincho); color: var(--gold-soft); letter-spacing: .08em; }
.tb-sky-title { margin: 2px 0 8px; font-size: 16px; color: var(--night-ink); letter-spacing: .06em; }
.tb-sky-text { margin: 0; font-size: 13.5px; line-height: 1.85; color: var(--night-soft); }
.tb-sky-nav { display: flex; justify-content: flex-end; gap: 8px; }
.tb-sky-nav button { width: 38px; height: 38px; border: 1px solid rgba(216, 200, 164, .5); background: transparent; color: var(--night-ink); font-size: 22px; line-height: 1; border-radius: 50%; cursor: pointer; }

/* 場面3 薔薇窓 */
.tb-s3 { background: var(--night); color: var(--night-ink); padding: 40px 0 34px; }
.tb-s3 .plate-ja { color: var(--night-ink); }
.tb-s3 .plate-lead, .tb-s4 .plate-lead, .tb-s5 .plate-lead { color: var(--night-soft); }
.tb-birth, .tb-cform { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 4px 0 22px; }
.tb-birth-l { font-size: 13.5px; color: var(--night-soft); }
.tb-birth select, .tb-cform select, .tb-letter-sign { height: 40px; padding: 0 10px; border: 1px solid var(--gold-soft); background: #fffdf8; color: var(--ink); font: inherit; font-size: 15px; border-radius: 2px; }
.tb-rose-stage { --sc: #E8C877; position: relative; max-width: 560px; margin: 0 auto; padding: 0 12px; }
.tb-rose { position: relative; width: min(100%, 520px); aspect-ratio: 1; margin: 0 auto; z-index: 2; }
.tb-rose img, .tb-rose-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.tb-rose img { border-radius: 50%; }
.tb-rose-dim { fill: #12152A; fill-opacity: 0; transition: fill-opacity 1s; pointer-events: none; }
.tb-rose-stage.has-pick .tb-rose-dim { fill-opacity: .55; }
.tb-petal { fill: #fff; fill-opacity: 0; stroke: transparent; stroke-width: 4; cursor: pointer; transition: fill-opacity .6s, stroke .4s; }
.tb-petal:hover, .tb-petal:focus { stroke: rgba(232, 210, 154, .7); }
.tb-petal.is-on { fill: #FFF6DC; fill-opacity: .14; stroke: #E8D29A; }
.tb-beam { position: absolute; z-index: 1; left: 50%; top: 52%; width: 78%; height: 46%; transform: translateX(-50%) scaleY(0); transform-origin: 50% 0; background: var(--sc); opacity: .22; clip-path: polygon(44% 0, 56% 0, 100% 100%, 0 100%); transition: transform 1.2s cubic-bezier(.3, .6, .3, 1); pointer-events: none; }
.tb-rose-stage.is-beam .tb-beam { transform: translateX(-50%) scaleY(1); }
.tb-floor { position: relative; margin: -18% auto 0; width: 100%; z-index: 0; }
.tb-floor img { display: block; width: 100%; height: auto; opacity: .28; transition: opacity 1.4s; -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent); mask-image: radial-gradient(closest-side, #000 72%, transparent); }
.tb-floor-tint { position: absolute; inset: 0; background: var(--sc); opacity: 0; mix-blend-mode: color; transition: opacity 1.4s; -webkit-mask-image: radial-gradient(closest-side, #000 40%, transparent); mask-image: radial-gradient(closest-side, #000 40%, transparent); }
.tb-rose-stage.is-floor .tb-floor img { opacity: 1; }
.tb-rose-stage.is-floor .tb-floor-tint { opacity: .45; }
.tb-rose-pick { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 18px auto 0; }
.tb-pick { padding: 5px 11px; border: 1px solid rgba(216, 200, 164, .45); background: transparent; color: var(--night-ink); font: inherit; font-size: 13px; border-radius: 14px; cursor: pointer; }
.tb-pick.is-on { background: var(--gold); border-color: var(--gold); color: #fff; }
.tb-result { margin-top: 4px; scroll-margin-top: 60px; }
.tb-card { background: #fffdf8; color: var(--ink); border: 1px solid var(--gold-soft); border-top: 4px solid var(--sc, var(--gold)); padding: 20px 18px 22px; border-radius: 2px; }
.tb-card-sign { margin: 0 0 10px; font: 700 21px/1.4 var(--mincho); letter-spacing: .12em; }
.tb-card-sign small { display: block; font: italic 500 13px/1.4 var(--latin); color: var(--gold); letter-spacing: .2em; }
.tb-kw { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 12px; padding: 0; }
.tb-kw span { padding: 3px 12px; border: 1px solid var(--sc, var(--gold)); border-radius: 14px; font: 500 14px/1.6 var(--mincho); background: #fff; color: var(--ink); }
.tb-card p.tb-card-sum { margin: 0 0 12px; line-height: 2; }
.tb-months-key { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 16px; }
.tb-months-key div { border: 1px solid var(--gold-soft); padding: 8px 12px; background: #fff; }
.tb-months-key dt { font-size: 12px; color: var(--ink-soft); }
.tb-months-key dd { margin: 0; font: 700 16px/1.5 var(--mincho); }
.tb-card .btn { display: block; text-align: center; }

/* 12星座の一覧 */
.tb-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 820px) { .tb-list { grid-template-columns: 1fr 1fr; } }
.tb-list a { display: flex; gap: 14px; padding: 12px; border: 1px solid var(--gold-soft); background: #fffdf8; color: var(--ink); text-decoration: none; height: 100%; }
.tb-list a:hover { border-color: var(--gold); }
.tb-list img { width: 72px; height: 108px; object-fit: cover; flex: none; }
.tb-list-main { display: flex; flex-direction: column; min-width: 0; }
.tb-list-name { font: 700 17px/1.5 var(--mincho); letter-spacing: .1em; }
.tb-list-name small { margin-left: 8px; font: 400 11.5px var(--gothic); color: var(--ink-soft); letter-spacing: 0; }
.tb-list-kw { font: 500 13.5px/1.6 var(--mincho); color: var(--navy); }
.tb-list-sum { font-size: 13px; line-height: 1.8; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 2px 0 4px; }
.tb-list-go { margin-top: auto; font-size: 12.5px; color: var(--blue); }

/* 場面4 イヤーカード */
.tb-s4 { background: var(--night); color: var(--night-ink); padding: 44px 0 36px; margin-top: 40px; }
.tb-s4 .plate-ja, .tb-s5 .plate-ja { color: var(--night-ink); }
.tb-table { position: relative; display: flex; justify-content: center; align-items: flex-end; gap: 34px; height: 300px; margin: 4px 0 10px; }
.tb-candle-one { width: 30px; height: auto; margin-bottom: 92px; animation: tbFlicker 3s ease-in-out infinite; transform-origin: 50% 90%; }
.tb-table::before { content: ""; position: absolute; left: calc(50% - 116px); bottom: 0; width: 26px; height: 92px; background: #EFE6CF; border: 1px solid #D8C8A4; border-bottom: 0; border-radius: 2px 2px 0 0; }
.tb-tcard { width: 168px; aspect-ratio: 2 / 3; perspective: 900px; }
.tb-tcard-in { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 1s cubic-bezier(.4, .1, .2, 1); }
.tb-tcard.is-flip .tb-tcard-in { transform: rotateY(180deg); }
.tb-tcard-back, .tb-tcard-front { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 6px; background: #3F4A6B center/cover no-repeat; border: 1px solid var(--gold-soft); }
.tb-tcard-front { transform: rotateY(180deg); background-color: #fffdf8; }
.tb-tcard.is-shake { animation: tbShake .7s ease-in-out; }
@keyframes tbShake { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-3deg); } 40% { transform: rotate(3deg); } 60% { transform: rotate(-2deg); } 80% { transform: rotate(1.5deg); } }
@keyframes tbFlicker { 0%, 100% { transform: scale(1, 1) rotate(0); } 25% { transform: scale(.96, 1.04) rotate(-1.5deg); } 50% { transform: scale(1.03, .97) rotate(1deg); } 75% { transform: scale(.98, 1.03) rotate(-.5deg); } }
.tb-card-result { scroll-margin-top: 60px; }
.tb-card-result .b-static { margin: 10px 0 14px; }
.tb-card-name { margin: 0 0 4px; text-align: center; font: 700 22px/1.5 var(--mincho); letter-spacing: .12em; }
.tb-card-name small { display: block; font: 400 12.5px var(--gothic); color: var(--night-soft); letter-spacing: .06em; }
.tb-card-go { text-align: center; margin: 0; }
.tb-card-go a { color: var(--candle); }
.tb-allcards { margin-top: 22px; border-top: 1px solid rgba(216, 200, 164, .35); padding-top: 12px; }
.tb-allcards summary { cursor: pointer; color: var(--candle); font-size: 14px; }
.tb-allcards h3 { font-size: 16px; margin: 18px 0 4px; color: var(--night-ink); }
.tb-allcards p { font-size: 14px; line-height: 1.95; color: var(--night-soft); margin: 0; }
.tb-allcards .k-note { color: var(--night-soft); margin: 8px 0; }
.tb-nums { margin: 0; display: grid; grid-template-columns: 28px 1fr; gap: 6px 10px; font-size: 14px; color: var(--night-soft); }
.tb-nums dt { font: 700 17px/1.6 var(--latin); color: var(--candle); }
.tb-nums dd { margin: 0; line-height: 1.85; }

/* 場面5 四本のろうそく */
.tb-s5 { background: var(--night); color: var(--night-ink); padding: 40px 0 40px; }
.tb-candles { display: grid; grid-template-columns: 1fr; gap: 0; }
.tb-stand-wrap { position: sticky; top: 48px; z-index: 3; background: var(--night); padding: 8px 0 10px; }
.tb-stand { position: relative; width: min(58vw, 260px); margin: 0 auto; padding-top: 0; }
/* 炎の位置は燭台の絵(.tb-stand-in)に対する割合。芯の先(上から0.2%)に炎の根元を合わせる */
.tb-stand { padding-top: 15%; }
.tb-stand-in { position: relative; }
.tb-stand-in > img:first-child { display: block; width: 100%; height: auto; }
.tb-flame { position: absolute; top: .6%; width: 7.5%; height: auto; transform: translate(-50%, -94%) scale(.2); transform-origin: 50% 94%; opacity: 0; transition: opacity .8s, transform .8s; }
.tb-flame.is-lit { opacity: 1; transform: translate(-50%, -94%) scale(1); animation: tbFlame 2.6s ease-in-out .8s infinite; }
.tb-flame[data-i="1"].is-lit { animation-delay: 1.3s; } .tb-flame[data-i="2"].is-lit { animation-delay: .5s; } .tb-flame[data-i="3"].is-lit { animation-delay: 1.8s; }
@keyframes tbFlame { 0%, 100% { transform: translate(-50%, -94%) scale(1, 1) rotate(0); } 30% { transform: translate(-50%, -94%) scale(.95, 1.05) rotate(-2deg); } 60% { transform: translate(-50%, -94%) scale(1.04, .97) rotate(1.5deg); } }
.tb-candle-list { display: flex; flex-direction: column; gap: 22px; padding-top: 14px; }
.tb-candle-block { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: start; padding: 16px; border: 1px solid rgba(216, 200, 164, .3); background: var(--night-2); opacity: .55; transition: opacity .8s; }
.tb-candle-block.is-on { opacity: 1; }
.tb-candle-person { width: 96px; height: auto; }
.tb-candle-no { margin: 0; font-size: 12px; color: var(--gold-soft); letter-spacing: .14em; }
.tb-candle-block h3 { margin: 0 0 6px; font-size: 18px; color: var(--night-ink); letter-spacing: .12em; }
.tb-candle-block p { margin: 0; font-size: 14.5px; line-height: 1.95; color: var(--night-ink); }
.tb-candle-block .tb-candle-go { margin-top: 8px; }
.tb-candle-go a { color: var(--candle); font-size: 13.5px; }
@media (min-width: 820px) {
  .tb-candles { grid-template-columns: 340px 1fr; gap: 40px; align-items: start; }
  .tb-stand-wrap { top: 70px; padding-top: 40px; }
  .tb-stand { width: 300px; }
  .tb-candle-list { gap: 40vh; padding: 10vh 0 30vh; }
  .tb-candle-block { grid-template-columns: 140px 1fr; }
  .tb-candle-person { width: 140px; }
}
@media (max-width: 819px) { .tb-candle-list { gap: 26vh; padding-bottom: 12vh; } }

/* 場面6 月の暦 */
.tb-s6 { padding-top: 48px; }
.tb-moons { list-style: none; margin: 0 0 14px; padding: 0; border-top: 1px solid var(--gold-soft); }
.tb-moons li { display: grid; grid-template-columns: 22px 44px 1fr; gap: 8px; align-items: baseline; padding: 11px 2px; border-bottom: 1px solid var(--gold-soft); font-size: 14.5px; line-height: 1.85; }
.tb-moons-m { font: 700 15px/1.6 var(--mincho); }
.tb-moon { display: inline-block; width: 15px; height: 15px; border-radius: 50%; transform: translateY(2px); }
.tb-moon-new { background: var(--navy); }
.tb-moon-full { background: #F2E6C4; border: 1px solid var(--gold); }
.tb-moon-eclipse { background: var(--navy); box-shadow: 0 0 0 2px #E8C877; }

/* 場面7 元日の手紙 */
.tb-s7 { padding: 48px 0 10px; }
.tb-letter-app { text-align: center; }
.tb-env { position: relative; width: min(100%, 420px); margin: 0 auto; }
.tb-env-img { display: block; width: 100%; height: auto; transition: opacity .8s, transform .8s; }
.tb-seal { position: absolute; left: 50.4%; top: 51.5%; width: 16%; aspect-ratio: 1; transform: translate(-50%, -50%) scale(1.8); opacity: 0; border-radius: 50%; background: #9E3A33; border: 2px solid #7E2B26; pointer-events: none; }
.tb-seal::after { content: "✦"; position: absolute; inset: 0; display: grid; place-items: center; color: #E9B9A9; font-size: 26px; }
.tb-env.is-sealing .tb-seal { animation: tbPress .7s cubic-bezier(.3, 1.4, .5, 1) forwards; }
.tb-env.is-sealed .tb-seal { opacity: 1; transform: translate(-50%, -50%) scale(1); }
@keyframes tbPress { 0% { opacity: 0; transform: translate(-50%, -50%) scale(1.8); } 60% { opacity: 1; transform: translate(-50%, -50%) scale(.92); } 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
.tb-env.is-break .tb-seal { opacity: 1; transform: translate(-50%, -50%); animation: tbBreak .9s ease-in forwards; }
@keyframes tbBreak { 0% { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); } 30% { clip-path: polygon(0 0, 60% 0, 40% 100%, 0 100%); transform: translate(-56%, -50%) rotate(-8deg); } 100% { clip-path: polygon(0 0, 60% 0, 40% 100%, 0 100%); transform: translate(-90%, -20%) rotate(-30deg); opacity: 0; } }
.tb-env.is-gone .tb-env-img { opacity: 0; transform: translateY(20px); }
.tb-paper { width: min(100%, 560px); margin: 0 auto; text-align: left; }
.tb-paper-img { display: block; width: 110px; height: auto; margin: 0 auto -8px; }
.tb-paper-text { background: #FFFDF6; border: 1px solid var(--gold-soft); padding: 26px 22px 24px; font-family: var(--mincho); font-size: 16px; line-height: 2.15; animation: tbUnfold 1.2s ease-out; }
.tb-paper-text p { margin: 0 0 .8em; }
.tb-paper-text .tb-sign-off { text-align: right; margin-top: 1em; }
@keyframes tbUnfold { from { opacity: 0; transform: translateY(16px) scaleY(.96); } to { opacity: 1; transform: none; } }
.tb-letter-ui { margin-top: 14px; }
.tb-letter-msg { margin: 0 0 10px; font-size: 14px; color: var(--ink-soft); line-height: 1.9; }
.tb-letter-form { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

/* 場面8 出口 */
.tb-s8 { padding: 44px 16px 20px; }
.tb-exit-go { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 18px 0 20px; }
.tb-share { margin-top: 18px; }

/* 子ページ(12星座) */
.tb-sign-head { display: grid; grid-template-columns: 110px 1fr; gap: 18px; align-items: center; padding-top: 18px; }
.tb-sign-win { width: 110px; height: auto; }
.tb-sign-range { margin: 0 0 4px; font-size: 13px; color: var(--ink-soft); }
.tb-sign .tb-kw span { border-color: var(--sc); }
.tb-sign-sum { font-family: var(--mincho); font-size: 16px; line-height: 2.05; margin: 0 0 14px; }
.tb-sec { margin-top: 34px; }
.tb-sec .prose p { line-height: 2.05; }
.tb-mflow { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--gold-soft); }
.tb-mflow li { display: grid; grid-template-columns: 58px 1fr; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--gold-soft); font-size: 14.5px; line-height: 1.85; }
.tb-mflow-m { font: 700 15px/1.6 var(--mincho); }
.tb-mflow-m small { display: block; font: 400 11px var(--gothic); color: var(--ink-soft); }
.tb-mflow li.is-up .tb-mflow-m { color: #8A6A2E; }
.tb-mflow li.is-care .tb-mflow-m { color: var(--blue); }
.tb-omamori { border: 1px solid var(--gold-soft); background: #fffdf8; padding: 14px 16px; }
.tb-omamori dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 10px; text-align: center; }
.tb-omamori dt { font-size: 11.5px; color: var(--ink-soft); }
.tb-omamori dd { margin: 0; font: 700 16px/1.5 var(--mincho); }
.tb-omamori p { margin: 0; font-size: 14px; line-height: 1.9; }
.tb-next-cards { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 0 0 14px; }
.tb-back-top { margin: 12px 0 0; }
@media (max-width: 560px) { .tb-sign-head { grid-template-columns: 84px 1fr; gap: 14px; } .tb-sign-win { width: 84px; } }

/* トップの入口(style.css を増やさないよう、ここにも置かない：トップ用は style.css 側) */

@media (prefers-reduced-motion: reduce) {
  .tb-scroll-cue, .tb-candle-one, .tb-flame.is-lit { animation: none !important; }
  .tb-leaf { transform: none !important; }
  .tb-hall { transform: none !important; }
  .tb-tcard-in, .tb-beam, .tb-floor img, .tb-floor-tint, .tb-welcome .b-row { transition-duration: .01s !important; transition-delay: 0s !important; }
}

/* 2026-11-28 検査の修正 */
/* 夜の背景では、文字用の金を明るい金にする */
.tb-s0, .tb-night, .tb-sky, .tb-s3, .tb-s4, .tb-s5 { --gold-ink: #D8C8A4; }
/* 最初の画面：絵の上の文字の下に、紺の影を敷いて読めるようにする */
.tb-s0-text { padding-bottom: 22px; background: radial-gradient(ellipse 80% 70% at 50% 48%, rgba(30, 34, 56, .78) 0%, rgba(30, 34, 56, .55) 55%, rgba(30, 34, 56, 0) 100%); }
.tb-s0-lead { font-size: 14.5px; color: var(--night-ink); }
.tb-s0-note { font-size: 12.5px; color: var(--night-ink); }
.tb-open { background: rgba(43, 49, 80, .85); }
