/* 天社宮トップ（日本語）の本文。Figma「天社宮TOP」に合わせる。マークアップは inc/tensha-top/sections.php
   文字サイズは onmyodo-typography.css が @layer の中で !important で決めているため、
   それより先に読み込むこのファイルでレイヤーを作って上書きする（祈願祭ページと同じ方法）。 */

@layer tensha-top {
  /* 中国語版（簡体・繁体）の MV のキャッチは、日本語版と同じく縦書き。字の大きさ・字送り・行送りは日本語版の縦書きの画像に合わせる
     （幅1440で 字20px・字送り25px・行送り45px。スマホは 字9px ほど） */
  body:is(.tensha-lang-zh-cn, .tensha-lang-zh-tw) .p-tensha-kv .p-tensha-kv__localized-copy { font-size: calc(20 / 1440 * 100vw) !important; line-height: 2.27 !important; }
  @media screen and (max-width: 767px) {
    body:is(.tensha-lang-zh-cn, .tensha-lang-zh-tw) .p-tensha-kv .p-tensha-kv__localized-copy { font-size: calc(9 / 375 * 100vw) !important; }
  }
  body .tt-top :is(p, li, span, a, figcaption, summary, h2, h3, small) { line-height: 1.75 !important; }
  /* 本文は両トップとも四季の会のページと同じ 18px・行34.2px（1.9）・太さ標準。スマホも同じ（2026-10-22 宮の指示） */
  body .tt-top .tt-text, body .tt-top .tt-text > p,
  body .tt-top .tt-intro__lead,
  body .tt-top .tt-card2__text, body .tt-top .tt-card3__text, body .tt-top .tt-sites__intro,
  body .tt-top .tt-box__text { font-size: 1.8rem !important; line-height: 1.9 !important; }
  body .tt-top .tt-band__reading { font-size: 1.6rem !important; line-height: 33px !important; }
  body .tt-top :is(.tt-card3__name, .tt-card2__title, .tt-h3, .tt-sites__title) { font-size: 2.4rem !important; line-height: 1.45 !important; }
  body .tt-top .tt-acc__title { font-size: 2.8rem !important; line-height: 1.45 !important; }
  body .tt-top .tt-box__title { font-size: 1.8rem !important; line-height: 26.25px !important; }
  body .tt-top .tt-flow__name { font-size: 2rem !important; line-height: 1.45 !important; }
  body .tt-top .tt-flow__box--taiitsu .tt-flow__name { font-size: 2.4rem !important; }
  body .tt-top :is(.tt-flow__note, .tt-calligraphy__note, .tt-sites__desc) { font-size: 1.4rem !important; line-height: 1.6 !important; }
  body .tt-top .tt-sites__name { font-size: 1.8rem !important; line-height: 1.45 !important; }
  body .tt-top .tt-sites__pref { font-size: 1.3rem !important; line-height: 1.45 !important; }
  /* 祈りの言葉：編纂所トップ（Figma「文書編纂所TOP」）と同じ。言葉22px・行40px、祈り16px・行31px */
  body .tt-top .tt-closing__quote { font-size: 2.2rem !important; line-height: 40px !important; }
  body .tt-top .tt-closing__message { font-size: 1.6rem !important; line-height: 31px !important; }
  body .tt-top .tt-link__eyebrow { font-size: 2.6rem !important; line-height: 1.45 !important; }
  body .tt-top .tt-link__sub { font-size: 1.6rem !important; line-height: 1.45 !important; }
  body .tt-top rt { font-size: .5em !important; line-height: 1 !important; }
}

.tt-top {
  --tt-ink: #1a1a1a;
  --tt-soft: rgba(226, 226, 224, .35);
  color: var(--tt-ink);
  font-family: "Noto Serif JP", "Yu Mincho", "Hiragino Mincho ProN", serif;
  background: #f5f5f1 url("../img/tensha-renew/bg-news-texture.png") repeat top left / 160px 163px;
}

.tt-top p { margin: 0; }
.tt-top ul, .tt-top ol { margin: 0; padding: 0; list-style: none; }
.tt-top img { max-width: 100%; height: auto; }

.tt-wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.tt-center { text-align: center; }

/* ---------- お知らせ（中身の見た目は tensha-renew-news.css。地を少し灰色に） ---------- */
/* Figma：地紋の上に薄い灰色を重ねた帯（お知らせ・祈りの言葉の節）。テンプレートの指定（#f4f4f4 の無地）より強くする */
body .tt-top .tt-news.p-tensha-news--renew,
body .tt-top .tt-closing {
  background: linear-gradient(var(--tt-soft), var(--tt-soft)), #f5f5f1 url("../img/tensha-renew/bg-news-texture.png") repeat top left / 160px 163px;
}
body .tt-top .tt-news.p-tensha-news--renew { padding: 52px 0 73px; }
.tt-top .tt-news .p-tensha-news__inner { max-width: 940px; margin: 0 auto; }
.tt-top .tt-news .p-tensha-news__list { max-width: 900px; margin-left: auto; margin-right: auto; }
.tt-top .tt-news .tt-center { margin-top: 44px; }

/* ---------- 天社宮（題字の帯） ---------- */
.tt-band {
  position: relative;
  max-width: 1200px;
  height: 270px;
  margin: 0 auto;
  overflow: hidden;
  text-align: center;
}

/* 雲は帯の左右の端で消えるようにぼかす（Figma のマスク：帯の幅の端 5% で透明から不透明へ） */
.tt-band { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 5%, #000 95%, transparent 100%); mask-image: linear-gradient(to right, transparent 0, #000 5%, #000 95%, transparent 100%); }

.tt-band__cloud { position: absolute; display: block; pointer-events: none; }
.tt-band__cloud--left { left: -64px; top: 54px; width: 481px; }
.tt-band__cloud--right { left: 750px; top: 28px; width: 568px; }

.tt-band__title { position: absolute; left: 50%; top: 89px; width: 279px; margin: 0; padding: 0; border: 0; transform: translateX(-50%); }
.tt-band__title img { display: block; width: 100%; height: auto; }
.tt-band__reading { position: absolute; left: 0; right: 0; top: 200px; font-weight: 500; letter-spacing: .1em; }

.tt-intro { padding-bottom: 106px; }
.tt-intro__lead { margin-top: 42px !important; font-weight: 400; text-align: center; }

/* 3枚のカード（社号・家学・納暦／太一・太陽太陰・星辰） */
.tt-cards3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 300px));
  justify-content: center;
  gap: 50px;
  margin-top: 47px !important;
}

.tt-card3 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  padding: 40px 38px;
  border: .5px solid var(--tt-ink);
  border-radius: 10px;
}

.tt-card3__icon { display: flex; align-items: center; justify-content: center; height: 120px; }
.tt-cards3--wide .tt-card3__icon { height: 102px; }
.tt-card3__icon img { display: block; max-height: 110px; width: auto; }
.tt-card3__icon--pair { gap: 14px; width: 100%; }
.tt-card3__icon--pair img { width: min(100px, calc(50% - 7px)); height: auto; }

.tt-card3__name {
  align-self: stretch;
  padding: 20px 0;
  border-top: .5px solid var(--tt-ink);
  border-bottom: .5px solid var(--tt-ink);
  text-align: center;
}

.tt-card3__text { align-self: stretch; text-align: justify; }

/* ---------- 一〜五（アコーディオン） ---------- */
.tt-accs { padding-bottom: 106px; }
.tt-accs .tt-acc { border-bottom: .5px solid var(--tt-ink); }
.tt-accs .tt-acc:first-child { border-top: .5px solid var(--tt-ink); }
/* 最後の節（五）を開いたときは、内容の下（枠の外）に線を引かない */
.tt-accs .tt-acc:last-child[open] { border-bottom: 0; }

.tt-acc__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 37px 0;
  cursor: pointer;
  list-style: none;
}

.tt-acc__summary::-webkit-details-marker { display: none; }
.tt-acc__summary:focus-visible { outline: 2px solid rgba(191, 56, 35, .45); outline-offset: 4px; }

.tt-acc__title { margin: 0; padding: 0; border: 0; color: var(--tt-ink); font-weight: 500; letter-spacing: 0; text-align: left; }

.tt-acc__chevron {
  flex-shrink: 0;
  width: 22px;
  height: 13px;
  margin-right: 40px;
  background: currentColor;
  -webkit-mask: url("../img/tensha-top/chevron.svg") no-repeat center / 13px 22px;
  mask: url("../img/tensha-top/chevron.svg") no-repeat center / 13px 22px;
  transform: rotate(90deg);
  transition: transform .2s;
}

.tt-acc[open] > .tt-acc__summary .tt-acc__chevron { transform: rotate(-90deg); }
.tt-acc[open] > .tt-acc__summary { border-bottom: .5px solid var(--tt-ink); }

.tt-acc__body { padding: 48px 0 106px; }

.tt-h3 { margin: 48px 0 0; padding: 0; border: 0; color: var(--tt-ink); font-weight: 500; letter-spacing: 0; text-align: left; }
.tt-acc__body > .tt-h3:first-child { margin-top: 0; }

.tt-text { margin-top: 23px !important; }
.tt-text > p + p { margin-top: 1em !important; }
.tt-text--center { margin-top: 48px !important; text-align: center; }

/* 一：曜日・初詣・厄年・卜占のカード */
.tt-cards2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 475px));
  justify-content: space-between;
  gap: 48px 50px;
  margin-top: 48px !important;
}

.tt-card2 {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 35px 42px 35px 43px;
  border: .5px solid var(--tt-ink);
  border-radius: 10px;
}

.tt-card2__title {
  padding-bottom: 16px;
  font-weight: 500;
  /* 二重線（Figma の罫） */
  background: linear-gradient(var(--tt-ink), var(--tt-ink)) left bottom / 100% .5px no-repeat,
              linear-gradient(var(--tt-ink), var(--tt-ink)) left calc(100% - 3.5px) / 100% .5px no-repeat;
}

.tt-card2__text { min-height: 5.4em; }
.tt-card2__art { display: flex; align-items: center; justify-content: center; height: 230px; padding: 29px 25px; }
.tt-card2__art img { display: block; max-height: 100%; width: auto; }

/* 三：太一の書と、太一から象までの図 */
.tt-calligraphy { margin: 48px auto 0; text-align: center; }
.tt-calligraphy__open { display: inline-block; padding: 0; border: 0; background: none; cursor: zoom-in; }
.tt-calligraphy__open img { display: block; width: 336px; max-width: 100%; height: auto; }
.tt-calligraphy__note { margin-top: 12px; }

.tt-flow { display: flex; flex-direction: column; align-items: stretch; gap: 24px; max-width: 603px; margin: 45px auto 0 !important; }
.tt-flow > li { position: relative; }
.tt-flow > li + li::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -24px;
  height: 24px;
  border-left: 1px dotted rgba(26, 26, 26, .6);
}
.tt-flow__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 19px; }
.tt-flow__pair::before { display: none; }
.tt-flow__pair > .tt-flow__box::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -24px;
  height: 24px;
  border-left: 1px dotted rgba(26, 26, 26, .6);
}

.tt-flow__box {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 16px 26px;
  border-radius: 10px;
  background: #fff;
  text-align: center;
}

.tt-flow__art { display: block; width: 115px; height: auto; }
.tt-flow__art--emblem { width: 88px; }
.tt-flow__art--compass { width: min(240px, 100%); }
.tt-flow__words { display: block; }
.tt-flow__gogyo { display: flex; justify-content: center; gap: 17px; }
.tt-flow__gogyo img { display: block; width: 50px; height: auto; }

/* 四：関連する読みもの */
.tt-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  max-width: 910px;
  margin: 48px auto 0;
  padding: 32px 40px;
  border-radius: 10px;
  background: var(--tt-soft);
}
.tt-box__title { margin-bottom: 14px !important; font-weight: 500; letter-spacing: 2.4px; }
.tt-box .c-btn { flex-shrink: 0; min-width: 262px; }

/* 五：安倍晴明暦 */
.tt-koyomi { display: flex; align-items: flex-start; justify-content: space-between; gap: 40px; }
.tt-koyomi__text { flex: 0 1 542px; }
.tt-koyomi__images { display: flex; flex-shrink: 0; }
/* 授与所の商品画像は、表紙の部分（.tt-koyomi__cover。比率と位置は sections.php が画像を測って入れる）を同じ高さで並べる */
.tt-koyomi__images { align-items: flex-end; gap: 14px; }
.tt-koyomi__images > img { display: block; width: 164px; height: auto; }
.tt-koyomi__cover { position: relative; display: block; flex-shrink: 0; height: 236px; overflow: hidden; }
.tt-koyomi__cover img { position: absolute; left: var(--tt-img-l); top: var(--tt-img-t); width: var(--tt-img-w) !important; max-width: none !important; height: auto !important; }

.tt-btns { display: flex; flex-direction: column; align-items: center; gap: 16px; margin-top: 24px; }
.tt-koyomi + .tt-btns { margin-top: 46px; }
/* 安倍晴明暦の節：見出し（天地の神々の巡りを記す暦）と表紙の画像の上をそろえる（2026-10-27 宮の指示）。PC の左右に並ぶときだけ。字の上の余白（行の高さの分）だけ画像を下げる */
@media screen and (min-width: 768px) {
  .tt-koyomi__text > .tt-h3:first-child { margin-top: 0; }
  .tt-koyomi__images { margin-top: 5px; } /* 見出しの行の高さ 34.8px と字の大きさ 24px の差の半分 */
}
.tt-btns .c-btn { min-width: 376px; }

.tt-sites {
  margin-top: 70px;
  padding: 62px 45px 60px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .9);
  text-align: center;
}
.tt-sites__title { margin: 0; padding: 0; border: 0; font-weight: 500; text-align: center; }
.tt-sites__intro { margin-top: 23px !important; }
/* 文字だけで並ぶので、各社の下に細い線を引き、上下に余白をとって一社ずつ区切る */
.tt-sites__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 40px; margin-top: 48px !important; text-align: left; }
/* 府県名・社寺名・紹介文の文字だけで並べる */
.tt-sites__item { display: flex; align-items: flex-start; padding: 24px 8px 26px 0; border-bottom: 1px solid rgba(26, 26, 26, .14); }
.tt-sites__item:nth-child(-n+3) { border-top: 1px solid rgba(26, 26, 26, .14); }
.tt-sites__body { display: flex; flex-direction: column; gap: 10px; }
.tt-sites__pref { margin-bottom: -6px; color: #6e6e6c; letter-spacing: .08em; }
/* 府県名のない社（白山神社様・神社本教）も、社寺名の高さを隣とそろえる */
@media (min-width: 768px) { .tt-sites__body:not(:has(.tt-sites__pref)) { padding-top: 23px; } }
.tt-sites__desc { text-align: justify; }

/* ---------- 祈りの言葉と、各ページへの案内 ---------- */
.tt-closing { padding: 158px 0 211px; text-align: center; }
.tt-closing__mark { display: block; width: 343px; margin: 0 auto; }
.tt-closing__quote { margin-top: 49px !important; font-weight: 400; }
.tt-closing__message { max-width: 900px; margin: 49px auto 0 !important; }

.tt-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 300px));
  justify-content: center;
  gap: 78px 50px;
  margin-top: 109px !important;
  padding-top: 109px !important;
  border-top: .5px solid var(--tt-ink);
  text-align: left;
}

.tt-link { display: flex; flex-direction: column; align-items: center; gap: 24px; }
/* 同じ段のカードで、見出し・写真・ボタンの段の高さをそろえる（言語によって見出しの行数が違っても写真とボタンが横に並ぶ）。
   カードを親の格子の3段にまたがらせ、subgrid で段を共有する。subgrid が使えないブラウザは上の並べ方のまま */
@supports (grid-template-rows: subgrid) {
  .tt-link { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 24px; justify-items: center; }
  .tt-link__head { min-height: 0 !important; justify-self: stretch; }
  .tt-link__btns { align-self: start; }
}
.tt-link__head { margin: 0; padding: 0; border: 0; color: var(--tt-ink); text-align: left; display: flex; flex-direction: column; align-self: stretch; min-height: 70px; }
.tt-link__eyebrow { font-weight: 500; }
.tt-link__sub { margin-top: 8px; font-weight: 500; }
.tt-link__img { display: block; width: 300px !important; height: 200px !important; border-radius: 10px; object-fit: cover; }
.tt-link__btns { display: flex; justify-content: center; gap: 20px; align-self: stretch; }
.tt-link__btns .c-btn { flex: 1 1 0; min-width: 0; max-width: 260px; }
/* 案内カードのボタンは幅が決まっているので、左右の余白と矢印との間を詰めて文字を1行に収める */
.tt-link__btns .c-btn { gap: 16px; padding-right: 20px; padding-left: 20px; white-space: nowrap; }
.tt-link__btns .c-btn + .c-btn,
.tt-link__btns .c-btn:has(+ .c-btn) { gap: 12px; padding-right: 16px; padding-left: 16px; }
/* 各言語版はボタン名が長いので、1行に収まらないときは折り返す */
body:not(.tensha-lang-ja) .tt-top .c-btn { white-space: normal; line-height: 1.4; letter-spacing: .02em; }
body:not(.tensha-lang-ja) .tt-top .tt-link__btns .c-btn { gap: 10px; padding-right: 14px; padding-left: 14px; }
/* 各言語版の MV の訳文：写真に日本語の言葉がないので、赤い線と黒い箱は付けず、文字だけを写真の上に置く */
body:not(.tensha-lang-ja) .p-tensha-kv .p-tensha-kv__localized-copy { min-height: 0; padding: 0; border-left: 0; background: none; text-shadow: 0 1px 10px rgba(0, 0, 0, .85); }
/* 中国語版（簡体・繁体）は縦書きにして、日本語版の縦書きの言葉と同じあたりに置く（行は右から左へ） */
body:is(.tensha-lang-zh-cn, .tensha-lang-zh-tw) .p-tensha-kv .p-tensha-kv__localized-copy {
  display: block; left: 16.9%; top: 51%; bottom: auto; width: auto; height: auto;
  writing-mode: vertical-rl; text-orientation: mixed; letter-spacing: .25em; font-weight: 500;
}
body.tensha-lang-zh-cn .p-tensha-kv .p-tensha-kv__localized-copy { font-family: "Noto Serif SC", "Songti SC", "SimSun", serif; }
body.tensha-lang-zh-tw .p-tensha-kv .p-tensha-kv__localized-copy { font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif; }
/* 各言語版の MV の訳文は日本語より長いので、スマホでは横に広げ、ヘッダーの下に潜らないようにする */
@media screen and (max-width: 767px) {
  body:not(.tensha-lang-ja) .p-tensha-kv .p-tensha-kv__localized-copy { width: calc(100% - 32px); bottom: 12%; }
  body:not(.tensha-lang-ja) .p-tensha-kv .p-tensha-kv__localized-copy br { display: none; }
}
@media screen and (max-width: 767px) {
  body:is(.tensha-lang-zh-cn, .tensha-lang-zh-tw) .p-tensha-kv .p-tensha-kv__localized-copy { left: 3%; top: 46%; bottom: auto; width: auto; } /* 日本語版のスマホの縦書きと同じ位置 */
  body:is(.tensha-lang-zh-cn, .tensha-lang-zh-tw) .p-tensha-kv .p-tensha-kv__localized-copy br { display: inline; }
}

/* ---------- スマホ ---------- */
@media screen and (max-width: 1040px) {
  .tt-band__cloud--right { left: auto; right: -118px; }
}

@media screen and (max-width: 767px) {
  .tt-wrap { padding: 0 16px; }
  body .tt-top .tt-news.p-tensha-news--renew { padding: 40px 0 48px; }
  .tt-band { height: 200px; }
  .tt-band__cloud--left { left: -120px; top: 40px; width: 300px; }
  .tt-band__cloud--right { right: -150px; top: 20px; width: 330px; }
  .tt-band__title { top: 60px; width: 200px; }
  .tt-band__reading { top: 140px; }
  .tt-intro { padding-bottom: 64px; }
  .tt-intro__lead { margin-top: 16px !important; text-align: left; }
  .tt-cards3 { grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 32px !important; }
  .tt-card3 { padding: 28px 24px; gap: 18px; }
  .tt-acc__summary { padding: 24px 0; }
  .tt-acc__chevron { margin-right: 8px; }
  .tt-acc__body { padding: 32px 0 64px; }
  .tt-accs { padding-bottom: 64px; }
  .tt-h3 { margin-top: 40px; }
  .tt-cards2 { grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 32px !important; }
  .tt-card2 { padding: 24px 20px; }
  .tt-card2__text { min-height: 0; }
  .tt-card2__art { height: 180px; padding: 12px; }
  .tt-calligraphy { margin-top: 32px; }
  .tt-flow__gogyo { gap: 8px; }
  .tt-flow__gogyo img { width: 44px; }
  .tt-text--center { text-align: left; }
  .tt-text--center br, .tt-text br.is-pc, .tt-closing br.is-pc, .tt-sites__intro br.is-pc, .tt-intro__lead br.is-pc { display: none; }
  .tt-box { flex-direction: column; align-items: stretch; gap: 20px; padding: 24px 20px; }
  .tt-box .c-btn { align-self: center; min-width: 0; }
  .tt-koyomi { flex-direction: column; }
  .tt-koyomi__text { flex-basis: auto; }
  .tt-koyomi__images { align-self: center; }
  .tt-btns .c-btn { min-width: 0; width: 100%; max-width: 340px; }
  .tt-sites { margin-top: 48px; padding: 36px 16px; }
  .tt-sites__grid { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 32px !important; }
  .tt-sites__item { padding: 18px 0 20px; }
  .tt-sites__item:nth-child(n+2) { border-top: 0; }
  .tt-closing { padding: 72px 0 96px; }
  .tt-closing__mark { width: 240px; }
  .tt-closing__quote { margin-top: 40px !important; }
  .tt-closing__message { margin-top: 40px !important; text-align: left; }
  .tt-links { grid-template-columns: minmax(0, 300px); gap: 48px; margin-top: 56px !important; padding-top: 56px !important; }
}

@layer tensha-top {
  @media screen and (max-width: 767px) {
    body .tt-top .tt-acc__title { font-size: 2.2rem !important; }
    body .tt-top :is(.tt-card3__name, .tt-card2__title, .tt-h3, .tt-sites__title) { font-size: 2rem !important; }
    body .tt-top .tt-closing__quote { font-size: 2rem !important; line-height: 1.8 !important; }
    body .tt-top .tt-closing__message { font-size: 1.6rem !important; line-height: 1.9 !important; }
    body .tt-top .tt-link__eyebrow { font-size: 2.6rem !important; }
    /* お知らせ：枠内の矢印は出さず、題は1行に収め、はみ出す分は行末を「...」にする */
    body .tt-top .tt-news .p-tensha-news__arrow { display: none !important; }
    body .tt-top .tt-news .p-tensha-news__text {
      min-width: 0;
      overflow: hidden !important;
      white-space: nowrap !important;
      text-overflow: ellipsis !important;
    }
  }
}

/* ---------- MV（PC）：Figma「天社宮TOP」の寸法（1728 幅で 帯 871・写真 1417.5×840 を中央、下は黒へぼかす） ----------
   写真（assets/img/tensha-top/mv.jpg、4096×2071 の横長）は幅を 117.2% にして左右を 8.57% ずつ切る（Figma と同じ切り方。縦横比が合うのでつぶれない）。縦書きの言葉（.draft-hero-lettering）は今の画像のまま、位置と大きさだけ合わせる。 */
@media screen and (min-width: 768px) {
  /* テンプレート内の指定（高さ auto・縦横比 3456/2048）より強くするため :not(#id) で詳細度を上げる */
  body .p-tensha-kv:not(#tt-mv) {
    height: calc(871 / 1728 * 100vw) !important;
    aspect-ratio: auto !important;
    background: #000;
    overflow: hidden;
  }

  body .p-tensha-kv .p-tensha-kv__bg {
    position: absolute;
    left: 50%;
    top: 0;
    width: calc(1417.5 / 1728 * 100vw);
    height: calc(840 / 1728 * 100vw);
    overflow: hidden;
    transform: translateX(-50%);
  }

  /* Figma の写真には文字が入っていないので、元の写真の文字を消す差し替え画像は使わない */
  body .p-tensha-kv .p-tensha-kv__bg .draft-hero-clean { display: none !important; }

  body .p-tensha-kv .p-tensha-kv__bg picture img {
    position: absolute !important;
    left: -8.57% !important;
    top: 0 !important;
    width: 117.2% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: fill !important;
  }

  body .p-tensha-kv::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: calc(840 / 1728 * 100vw);
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 96.635%, #000);
    pointer-events: none;
  }

  /* 縦書きの言葉は写真の枠（1417.5×840、左端は Figma の x=155.25）の中に置かれているので、写真に対する割合で指定する */
  body .p-tensha-kv .draft-hero-lettering {
    left: calc((292 - 155.25) / 1417.5 * 100%) !important;
    /* 大きさは元のトップと同じ（幅1440で高さ290px）。写真の枠の中に収まるよう上端は 53% */
    top: 53% !important;
    height: calc(290 / 700 * 100%) !important;
    z-index: 1;
  }
}

/* 親字より長いルビ（「理（ことわり）」など）：ルビを親字の上に重ねて置き、親字の前後に空きを作らない */
.tt-top ruby.tt-ruby-over { position: relative; }
.tt-top ruby.tt-ruby-over rt { position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); white-space: nowrap; }
