/* 宇宙からの手紙 — トップページ (tokens.css を先に読み込む) */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--color-night-deep); }
img, svg { display: block; }
a { color: inherit; text-decoration: none; }
:where(a, button):focus-visible { outline: 2px solid var(--color-gold-light); outline-offset: 2px; }
.nobr { display: inline-block; } /* 日本語の改行位置を意味の切れ目に固定する */

.page {
  max-width: var(--container-max);
  margin: 0 auto;
  overflow: hidden;
  container-type: inline-size;
  --u: calc(100cqi / 390); /* 原案を390px幅にしたときの1px。ヘッダーとヒーローの配置だけに使う */
  background: var(--color-paper);
  font-family: var(--font-serif);
  color: var(--color-ink);
}

/* header (ヒーローに重ねる)
   位置と大きさは原案（月夜に届く占い案内.png）の座標に合わせる。--u = 原案を390px幅にしたときの1px。
   押せる範囲は高さ44pxを保ち、見た目の中心を原案の位置（上から12u）に置く */
.site-header { position: relative; z-index: 2; height: 0; }
.site-header__bar {
  position: absolute; left: 0; right: 0; top: calc(var(--u) * 12 - var(--tap) / 2); height: var(--tap);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 0 0 calc(var(--u) * 15); /* ボタンは押せる幅44pxを優先。原案より虫めがねが約17px左になる */
}
.site-header__logo { display: flex; align-items: center; gap: calc(var(--u) * 9); min-height: var(--tap); color: var(--color-on-night); }
.site-header__logo > svg { width: calc(var(--u) * 17); height: auto; }
.site-header__name { font-size: var(--fs-logo); font-weight: 500; letter-spacing: .02em; text-shadow: 0 0 8px var(--color-night-shadow); }
.plus { color: var(--color-gold-light); font-weight: 400; margin-left: 4px; }
.site-header__actions { display: flex; }
.icon-button {
  width: var(--tap); height: var(--tap);
  display: grid; place-items: center;
  padding: 0; border: 0; background: transparent; color: var(--color-on-night-sub); cursor: pointer;
}
.site-header .icon-button svg { width: calc(var(--u) * 14); height: auto; }

/* hero：原案どおり画像の横幅を全部見せ、文字は原案の座標に置く（すべて列の幅に比例） */
.hero {
  position: relative;
  aspect-ratio: 887 / 455;
  background: var(--color-night) url(hero.webp) center bottom / cover no-repeat;
}
.hero__inner { /* 幅83% = 中心を左41.5%（原案の161u）に置き、天球儀と月の間に収める */
  position: absolute; left: 0; top: calc(var(--u) * 30); width: 83%;
  display: flex; flex-direction: column; align-items: center;
}
.hero__inner > svg { width: auto; height: calc(var(--u) * 14); }
.hero__title {
  margin: calc(var(--u) * 3) 0; text-align: center;
  font-family: var(--font-hero); font-size: var(--fs-hero); font-weight: 200; line-height: 1.16; letter-spacing: .1em;
  color: var(--color-on-night); text-shadow: 0 0 22px rgba(24, 16, 40, .55), 0 0 28px rgba(230, 204, 150, .22); /* 影と光は遠く淡く。近いと細い線が太って見える */
}
.hero__title .line { display: block; }
.hero__title .plus { font-size: max(12px, .55em); vertical-align: .35em; margin-left: .15em; }
.hero__lead {
  margin: calc(var(--u) * 2) 0 0; text-align: center;
  font-family: var(--font-hero); font-size: var(--fs-hero-sub); font-weight: 300; line-height: 1.33; letter-spacing: .06em;
  color: var(--color-on-night); text-shadow: 0 0 22px rgba(24, 16, 40, .55), 0 0 28px rgba(230, 204, 150, .22);
}
.hero__lead .line { display: block; }

/* section heading */
.section { padding: 6px var(--page-gutter) 34px; }
.section--rec {
  padding: 26px var(--page-gutter) 28px;
  background:
    linear-gradient(var(--color-paper), rgb(249 242 238 / 0) 90px),
    radial-gradient(120% 60% at 0% 12%, rgb(var(--color-lavender) / .55), rgb(var(--color-lavender) / 0) 60%),
    radial-gradient(110% 55% at 100% 10%, rgb(var(--color-lavender) / .5), rgb(var(--color-lavender) / 0) 60%),
    var(--color-paper);
}
.ornament { margin: 0 auto 4px; }
.section-heading { display: flex; align-items: center; justify-content: center; gap: 14px; }
.section-heading__title { margin: 0; font-size: var(--fs-h2); font-weight: 700; line-height: 1.4; letter-spacing: .14em; white-space: nowrap; }
.section-lead { margin: 10px 0 18px; text-align: center; font-size: var(--fs-body); font-weight: 500; line-height: 1.8; letter-spacing: .04em; color: var(--color-ink-sub); }
.list { display: grid; gap: var(--list-gap); margin: 0; padding: 0; list-style: none; }

/* fortune card (角がえぐれた金の二重枠) */
.fortune-card {
  position: relative; display: block; min-height: 120px; overflow: hidden;
  border-radius: var(--radius-card);
  background: linear-gradient(90deg, var(--color-card-from), var(--color-card-to));
  color: var(--color-ink);
}
.fortune-card__image {
  position: absolute; inset: 0 auto 0 0; width: 56%; height: 100%;
  object-fit: cover; object-position: left center;
  -webkit-mask-image: linear-gradient(90deg, #000 58%, transparent 100%);
          mask-image: linear-gradient(90deg, #000 58%, transparent 100%);
}
.fortune-card__body { position: relative; margin-left: 57%; padding: 20px 14px 16px 0; }
.fortune-card__title { margin: 0; font-size: var(--fs-card-title); font-weight: 700; line-height: 1.4; letter-spacing: .1em; }
.fortune-card__text { margin: 6px 0 0 4px; font-family: var(--font-sans); font-size: var(--fs-body); font-weight: 500; line-height: 1.7; letter-spacing: .08em; color: var(--color-ink-muted); }
.fortune-card__arrow { margin: 8px 0 0 52px; color: var(--color-gold-deep); }
.fortune-card::after { /* 枠: frame.svg を9分割で伸ばす。角の外側は紙色で塗られ、画像の角を隠す */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  border: 16px solid transparent;
  border-image: url(frame.svg) 22 stretch;
}

/* article row */
.article-row {
  display: grid; grid-template-columns: 38% 1fr 32px; align-items: center;
  min-height: 86px; overflow: hidden;
  background: var(--color-row);
  border: 1px solid rgb(176 134 85 / .14);
  border-radius: var(--radius-row);
  box-shadow: var(--shadow-row);
  color: var(--color-ink);
}
.article-row__image { width: 100%; height: 100%; object-fit: cover; }
.article-row__body { padding: 10px 0 10px 12px; }
.tag {
  display: inline-block; padding: 2px 10px 3px; border-radius: var(--radius-pill);
  background: var(--color-tag); color: #fffdf8;
  font-family: var(--font-sans); font-size: var(--fs-tag); font-weight: 500; line-height: 1.5; letter-spacing: .1em;
}
.article-row__title { margin: 5px 0 0; font-size: var(--fs-row-title); font-weight: 700; line-height: 1.5; letter-spacing: .04em; }
.article-row__chevron { justify-self: center; color: var(--color-gold-deep); }

/* footer */
.site-footer { padding-bottom: 22px; background: var(--color-footer); color: var(--color-on-night-sub); }
.site-footer__art {
  width: 100%; height: auto;
  -webkit-mask-image: linear-gradient(#000 62%, transparent 100%);
          mask-image: linear-gradient(#000 62%, transparent 100%);
}
.site-footer__inner { position: relative; margin-top: -15%; display: flex; flex-direction: column; align-items: center; padding: 0 12px; } /* -15% = 画像の波より下からロゴを始める */
.site-footer__name { margin: 0; font-size: var(--fs-footer-logo); font-weight: 400; line-height: 1.4; letter-spacing: .08em; text-shadow: 0 0 10px rgba(24, 16, 40, .7); }
.site-footer__name .plus { font-size: .7em; }
.footer-nav { margin-top: 2px; font-family: var(--font-sans); font-size: var(--fs-body); font-weight: 400; line-height: 1.5; letter-spacing: .04em; }
.footer-nav__row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; margin: 0; padding: 0; list-style: none; }
.footer-nav__row li { display: flex; align-items: center; }
.footer-nav__row li + li::before { content: ""; width: 1px; height: 12px; background: rgb(246 242 238 / .5); }
.footer-nav a { display: flex; align-items: center; min-height: var(--tap); padding: 0 8px; }
.site-footer__copy { margin: 6px 0 0; font-family: var(--font-sans); font-size: var(--fs-small); letter-spacing: .06em; opacity: .85; }
.site-footer__copy small { font-size: inherit; }

/* ---- ここから下はサイトへの組み込みで足したもの（見本にはない） ---- */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 準備中：ページがまだない項目。押せない表示にする */
.soon {
  display: inline-block; padding: 1px 10px 2px; border: 1px solid rgb(168 124 76 / .55); border-radius: var(--radius-pill);
  font-family: var(--font-sans); font-size: var(--fs-tag); font-weight: 500; line-height: 1.5; letter-spacing: .1em;
  color: var(--color-gold-deep); background: rgb(255 253 248 / .6);
}
.fortune-card .soon { margin: 3px 0 0 4px; padding: 0 9px; line-height: 1.25; } /* 矢印（上8px＋高さ10px）とほぼ同じ高さに収め、カードの高さを見本とそろえる */
.article-row .soon { margin-left: 6px; vertical-align: top; }
.footer-nav__soon { display: flex; align-items: center; min-height: var(--tap); padding: 0 8px; opacity: .55; }

/* メニュー（三本線のボタンで開く） */
.site-menu {
  width: min(100vw, var(--container-max)); max-width: none; height: 100dvh; max-height: none;
  margin: 0 auto; padding: 64px 28px 32px; border: 0;
  background: var(--color-night); color: var(--color-on-night);
  font-family: var(--font-serif);
}
.site-menu::backdrop { background: rgb(24 16 40 / .6); }
.site-menu__close { position: absolute; top: 6px; right: 4px; color: var(--color-on-night-sub); }
.site-menu__list { margin: 0; padding: 0; list-style: none; border-top: 1px solid rgb(201 164 103 / .35); }
.site-menu__list li { border-bottom: 1px solid rgb(201 164 103 / .35); }
.site-menu__list a { display: flex; align-items: center; min-height: 56px; font-size: 16px; font-weight: 500; letter-spacing: .1em; color: inherit; }
.site-menu__note { margin: 20px 0 0; font-family: var(--font-sans); font-size: var(--fs-body); line-height: 1.8; color: var(--color-on-night-sub); opacity: .8; }
