/* 宝石暦：タロットのカードに合わせた、夜空の地に古い金の装飾 */
/* ウェブフォント（サイトに同梱。使っている文字だけに絞ってある。文章を直したら npm run fonts で作り直す） */
@font-face { font-family: "Shippori Mincho B1"; src: url("fonts/shippori-mincho-b1-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Shippori Mincho B1"; src: url("fonts/shippori-mincho-b1-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Shippori Mincho B1"; src: url("fonts/shippori-mincho-b1-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Cinzel"; src: url("fonts/cinzel.woff2") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; }

:root {
  --night: #0c100e;
  --night-2: #141b17;
  --panel: rgba(18, 24, 21, .82);
  --ivory: #efe6d2;
  --muted: #b5a98f;
  --gold: #c9a45c;
  --gold-light: #e8cf94;
  --gold-dim: rgba(201, 164, 92, .38);
  --mincho: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --roman: "Cinzel", "Times New Roman", serif;
  /* 四隅の飾り（ひし形） */
  --diamond: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3E%3Cpath d='M7 0l7 7-7 7-7-7z' fill='%23c9a45c'/%3E%3Cpath d='M7 3.5l3.5 3.5-3.5 3.5-3.5-3.5z' fill='%230c100e'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--night); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ivory);
  font-family: var(--mincho);
  font-size: 16px;
  line-height: 1.95;
  letter-spacing: .03em;
  text-wrap: pretty;
  background:
    radial-gradient(1px 1px at 12% 18%, rgba(255, 246, 216, .7), transparent 60%),
    radial-gradient(1px 1px at 78% 9%, rgba(255, 246, 216, .55), transparent 60%),
    radial-gradient(1.5px 1.5px at 64% 34%, rgba(255, 246, 216, .5), transparent 60%),
    radial-gradient(1px 1px at 30% 52%, rgba(255, 246, 216, .45), transparent 60%),
    radial-gradient(1px 1px at 88% 61%, rgba(255, 246, 216, .5), transparent 60%),
    radial-gradient(1.5px 1.5px at 8% 76%, rgba(255, 246, 216, .4), transparent 60%),
    radial-gradient(1px 1px at 52% 88%, rgba(255, 246, 216, .45), transparent 60%),
    radial-gradient(ellipse 90% 60% at 50% 0%, #1e2a23 0%, transparent 70%),
    linear-gradient(var(--night-2), var(--night) 40%);
  background-size: 420px 640px, 420px 640px, 420px 640px, 420px 640px, 420px 640px, 420px 640px, 420px 640px, 100% 100%, 100% 100%;
  background-repeat: repeat, repeat, repeat, repeat, repeat, repeat, repeat, no-repeat, no-repeat;
}
/* 見出しや短い文だけ、文節で改行する */
h1, h2, h3, .lead, .result-phrase, .gem-card-phrase, .note { word-break: auto-phrase; }
main { max-width: 640px; margin: 0 auto; padding: 0 16px 72px; }
h1, h2, h3 { font-family: var(--mincho); font-weight: 700; line-height: 1.5; margin: 0; }
p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ヘッダー */
.site-header { text-align: center; padding: 30px 16px 0; }
.logo { color: inherit; text-decoration: none; display: inline-flex; flex-direction: column; align-items: center; gap: 4px; }
.logo-ja { font-weight: 700; font-size: 26px; letter-spacing: .32em; padding-left: .32em; color: var(--gold-light); }
.logo-en { font-family: var(--roman); font-size: 10px; letter-spacing: .4em; color: var(--gold); padding-left: .4em; }

/* ヘッダーのティアラ（12の宝石） */
.tiara { position: relative; width: min(420px, 100%); aspect-ratio: 400 / 140; margin: 0 auto -26px; }
.tiara-thread { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.tiara img { position: absolute; height: auto; transform: translate(-50%, -50%); filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .6)) drop-shadow(0 0 6px rgba(232, 207, 148, .25)); animation: gem-glint 4.5s ease-in-out infinite; }
.tiara img:nth-child(odd) { animation-delay: 1.5s; }
.tiara img:nth-child(3n) { animation-delay: 3s; }
@keyframes gem-glint { 0%, 100% { filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .6)) drop-shadow(0 0 6px rgba(232, 207, 148, .25)); } 50% { filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .6)) drop-shadow(0 0 12px rgba(255, 240, 200, .6)); } }
@media (prefers-reduced-motion: reduce) { .tiara img { animation: none; } }

/* ヒーロー */
.hero { text-align: center; padding: 36px 0 28px; }
.emblem { width: 76px; height: 76px; color: var(--gold); display: block; margin: 0 auto 18px; filter: drop-shadow(0 0 12px rgba(232, 207, 148, .35)); }
.hero h1 { font-size: clamp(28px, 7vw, 38px); letter-spacing: .1em; color: var(--ivory); text-shadow: 0 0 24px rgba(232, 207, 148, .18); }
.lead { margin-top: 20px; color: var(--muted); font-size: 15px; }
.nowrap { white-space: nowrap; }
.lead strong { color: var(--gold-light); font-weight: 500; }

/* 金の二重線と四隅の飾りの枠（カードの枠に合わせる） */
.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--gold);
  border-radius: 6px;
  padding: 34px 22px 30px;
  margin-top: 28px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45), inset 0 0 40px rgba(201, 164, 92, .06);
}
.card::before {
  content: ""; position: absolute; inset: 5px; border: 1px solid var(--gold-dim); border-radius: 3px; pointer-events: none;
}
.card::after {
  content: ""; position: absolute; inset: -7px; pointer-events: none;
  background: var(--diamond) left top / 14px no-repeat, var(--diamond) right top / 14px no-repeat,
    var(--diamond) left bottom / 14px no-repeat, var(--diamond) right bottom / 14px no-repeat;
}
.card-title { font-size: 18px; text-align: center; margin-bottom: 22px; color: var(--gold-light); letter-spacing: .12em; }

/* フォーム */
.selects { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px; }
select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(8, 11, 10, .7) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23c9a45c'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1px solid var(--gold-dim);
  border-radius: 4px;
  padding: 12px 28px 12px 12px;
  font: inherit;
  color: var(--ivory);
}
select option { background: #121815; color: var(--ivory); }
select:focus-visible, .button:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 2px; }
.error { color: #f0a59a; font-size: 14px; margin-top: 10px; text-align: center; }
.button {
  display: block;
  width: 100%;
  margin-top: 22px;
  padding: 14px;
  border: 1px solid var(--gold-light);
  border-radius: 4px;
  background: linear-gradient(180deg, #e3c584, #b8913f);
  color: #1a1408;
  font: inherit;
  font-weight: 700;
  letter-spacing: .2em;
  cursor: pointer;
  box-shadow: inset 0 0 0 3px rgba(26, 20, 8, .18), 0 6px 18px rgba(201, 164, 92, .25);
}
.button:hover { background: linear-gradient(180deg, #edd297, #c39c4a); }
.button-ghost { background: transparent; color: var(--gold-light); border: 1px solid var(--gold); box-shadow: none; }
.button-ghost:hover { background: rgba(201, 164, 92, .1); }
.note { margin-top: 14px; font-size: 12px; color: var(--muted); text-align: center; }

/* 結果 */
.result { text-align: center; outline: none; scroll-margin-top: 16px; }
.eyebrow { font-size: 13px; color: var(--gold); letter-spacing: .3em; }
.result-type { font-size: clamp(30px, 8vw, 40px); letter-spacing: .12em; margin-top: 4px; color: var(--gold-light); text-shadow: 0 0 20px rgba(232, 207, 148, .2); }
.result-art { margin: 22px auto 10px; display: flex; justify-content: center; }
.result-phrase { font-size: 18px; color: var(--muted); }
.block { text-align: left; margin-top: 26px; padding-top: 22px; position: relative; }
.block::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 9px;
  background: linear-gradient(var(--gold-dim), var(--gold-dim)) center / 100% 1px no-repeat;
}
.block::after { content: ""; position: absolute; top: -2px; left: calc(50% - 6.5px); width: 13px; height: 13px; background: var(--diamond) center / 13px no-repeat; }
.block h3 { font-size: 17px; margin-bottom: 8px; color: var(--gold-light); }
.block-sub { font-size: 12px; color: var(--gold); letter-spacing: .06em; margin: -4px 0 8px; }
.soon { margin-top: 10px; font-size: 13px; color: var(--muted); }
.meta { margin-top: 26px; font-size: 12px; color: var(--muted); letter-spacing: .08em; }

.deeper { margin-top: 34px; }
.button-deeper { background: transparent; color: var(--gold-light); border: 1px solid var(--gold); box-shadow: inset 0 0 0 3px rgba(201, 164, 92, .12), 0 0 22px rgba(232, 207, 148, .12); }
.button-deeper:hover { background: rgba(201, 164, 92, .12); }
.block-intimate { outline: none; text-align: center; scroll-margin-top: 20px; }
.block-intimate p:not(.eyebrow) { text-align: justify; }
.block-intimate .eyebrow, .block-intimate h3 { text-align: center; }
.block-intimate .eyebrow { letter-spacing: .3em; font-feature-settings: normal; line-height: 1.9; }
.block-intimate h3 { font-size: 20px; letter-spacing: .14em; margin: 2px 0 12px; }
.reveal { animation: reveal 1.2s ease-out; }
@keyframes reveal { from { opacity: 0; transform: translateY(10px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@media (prefers-reduced-motion: reduce) { .reveal { animation: none; } }

.sex-items { margin: 20px 0 0; text-align: left; }
.sex-items dt { font-weight: 700; color: var(--gold-light); font-size: 15px; margin-top: 18px; padding-left: 18px; position: relative; }
.sex-items dt::before { content: ""; position: absolute; left: 0; top: .55em; width: 10px; height: 10px; background: var(--diamond) center / 10px no-repeat; }
.sex-items dd { margin: 4px 0 0; }

.timely {
  position: relative; margin: 28px 0 6px; padding: 26px 18px 22px; text-align: left;
  border: 1px solid var(--gold); border-radius: 4px;
  background: linear-gradient(180deg, rgba(201, 164, 92, .14), rgba(201, 164, 92, .04));
  box-shadow: inset 0 0 0 4px rgba(12, 16, 14, .6), inset 0 0 0 5px var(--gold-dim), 0 0 30px rgba(232, 207, 148, .08);
}
.timely::after {
  content: ""; position: absolute; inset: -7px; pointer-events: none;
  background: var(--diamond) left top / 14px no-repeat, var(--diamond) right top / 14px no-repeat,
    var(--diamond) left bottom / 14px no-repeat, var(--diamond) right bottom / 14px no-repeat;
}
.timely-eyebrow { text-align: center; font-size: 16px; font-weight: 700; color: var(--gold-light); letter-spacing: .2em; }
.timely-note { text-align: center; font-size: 11px; color: var(--muted); letter-spacing: .1em; margin-top: 2px; }
.timely-item { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--gold-dim); }
.timely-item h3 { font-size: 17px; color: var(--gold-light); margin-bottom: 2px; }

.rarity { margin: 18px auto 0; max-width: 320px; }
.rarity-no, .rarity-rank { display: flex; justify-content: center; align-items: baseline; gap: 10px; font-size: 15px; color: var(--ivory); letter-spacing: .08em; }
.rarity-rank { margin-top: 2px; color: var(--gold-light); }
.rarity-label { font-family: var(--roman); font-size: 10px; letter-spacing: .3em; color: var(--gold); }
.rarity.is-rare .rarity-rank { text-shadow: 0 0 12px rgba(232, 207, 148, .55); }
.rarity-row { display: grid; grid-template-columns: repeat(3, auto); justify-content: center; column-gap: 22px; }
.rarity-cell { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 15px; color: var(--ivory); letter-spacing: .04em; white-space: nowrap; }
.rarity-row + .rarity-rank { margin-top: 14px; }
.rarity-stars { text-align: center; font-size: 20px; letter-spacing: .18em; color: var(--gold-light); line-height: 1.4; margin-top: 2px; }
.rarity.is-rare .rarity-stars { text-shadow: 0 0 12px rgba(232, 207, 148, .6); }
.rarity-combo { margin-top: 12px; }
.rarity-source { margin-top: 6px; font-size: 10px; color: var(--muted); opacity: .75; line-height: 1.7; text-align: center; word-break: auto-phrase; }
.rarity-text { margin-top: 8px; font-size: 12px; color: var(--muted); line-height: 1.8; text-align: center; word-break: auto-phrase; }

/* セクション */
.section { margin-top: 76px; }
.section-title { font-size: 22px; text-align: center; letter-spacing: .2em; color: var(--gold-light); }
.section-title::after {
  content: ""; display: block; width: 150px; height: 14px; margin: 14px auto 0;
  background: var(--diamond) center / 14px no-repeat,
    linear-gradient(90deg, transparent, var(--gold) 30%, var(--gold) 45%, transparent 45%, transparent 55%, var(--gold) 55%, var(--gold) 70%, transparent) center / 100% 1px no-repeat;
}
.section-lead { margin-top: 20px; color: var(--muted); font-size: 15px; }

/* 12の宝石 */
.gem-list { list-style: none; padding: 0; margin: 26px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 20px 12px; }
.gem-tile { display: flex; flex-direction: column; align-items: center; text-align: center; }
.gem-tile-art {
  position: relative; width: 100%; aspect-ratio: 4 / 5; border-radius: 6px; overflow: hidden;
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 56%, rgba(255, 233, 180, .26), rgba(255, 233, 180, 0) 54%), linear-gradient(#1d2722, #0d1210);
  border: 1px solid var(--gold);
  box-shadow: 0 12px 26px rgba(0, 0, 0, .5);
}
.gem-tile-art::before, .gem-tile-art::after { content: ""; position: absolute; pointer-events: none; border: 1px solid var(--gold-dim); border-radius: 3px; inset: 5px; }
.gem-tile-art::after { inset: 9px; border-width: .5px; }
.gem-tile-art img { width: 74%; height: auto; margin-top: 9%; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .55)); }
.gem-tile-num { position: absolute; top: 14px; left: 0; right: 0; font-family: var(--roman); font-size: 14px; letter-spacing: .2em; color: var(--gold-light); }
.gem-tile-sparkles { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.gem-tile-en { margin-top: 12px; font-family: var(--roman); font-size: 10px; letter-spacing: .3em; color: var(--gold); line-height: 1.4; }
.gem-tile-name { font-size: 16px; margin: 2px 0 4px; color: var(--ivory); }
.gem-card-phrase { font-size: 12px; color: var(--muted); line-height: 1.6; }

/* 10の景色 */
.scene-list { list-style: none; padding: 0; margin: 26px 0 0; border-top: 1px solid var(--gold-dim); }
.scene-list li { display: grid; grid-template-columns: 52px 1fr; gap: 14px; align-items: center; padding: 14px 4px; border-bottom: 1px solid var(--gold-dim); }
.scene-list li div { display: flex; flex-direction: column; }
.scene-name { font-weight: 700; font-size: 17px; color: var(--gold-light); }
.scene-text { font-size: 14px; color: var(--muted); line-height: 1.7; }
.frame-swatch { display: block; width: 52px; height: 52px; border-radius: 4px; border: 1px solid var(--gold-dim); }

/* 結果のカード（60枚の完成カード） */
.tarot { position: relative; width: 280px; max-width: 100%; margin: 0; border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 1px var(--gold-dim), 0 18px 40px rgba(0, 0, 0, .6), 0 0 60px rgba(232, 207, 148, .12); background: #1d1b24; }
.tarot img { display: block; width: 100%; height: auto; }
.tarot-sparkles { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.twinkle { animation: twinkle 2.8s ease-in-out infinite; }
@keyframes twinkle {
  0%, 100% { opacity: .25; transform: scale(.55) rotate(0deg); }
  50% { opacity: 1; transform: scale(1) rotate(20deg); }
}
@media (prefers-reduced-motion: reduce) { .twinkle { animation: none; opacity: .9; } }

/* フッター */
.site-footer {
  text-align: center; padding: 34px 16px 44px; font-size: 12px; color: var(--muted); letter-spacing: .1em; position: relative;
}
.site-footer::before {
  content: ""; display: block; width: 150px; height: 14px; margin: 0 auto 18px;
  background: var(--diamond) center / 14px no-repeat,
    linear-gradient(90deg, transparent, var(--gold-dim) 30%, var(--gold-dim) 45%, transparent 45%, transparent 55%, var(--gold-dim) 55%, var(--gold-dim) 70%, transparent) center / 100% 1px no-repeat;
}

@media (min-width: 560px) {
  .gem-list { grid-template-columns: repeat(3, 1fr); }
  .tarot { width: 320px; }
  .card { padding: 40px 34px 34px; }
}

/* 本文は左右の端をそろえる（行末に1文字分の空きが出て、右の余白が広く見えるのを防ぐ） */
.block p, .timely-item p:not(.block-sub), .sex-items dd, .section-lead, .scene-text {
  text-align: justify;
  text-justify: inter-character;
  letter-spacing: 0;
  font-feature-settings: "palt" 1; /* かなや句読点のまわりの余白を詰める */
  line-height: 2;
}

/* 幅の狭いスマホでは、CARD・BIRTH・RANKの並びを少し詰める */
@media (max-width: 359px) { .rarity-row { column-gap: 12px; } .rarity-cell { font-size: 13px; } }

/* プライバシーポリシー */
.policy { padding-top: 40px; }
.policy .block h2 { font-size: 17px; margin-bottom: 8px; color: var(--gold-light); }
.policy .block p + p { margin-top: 10px; }
.policy a, .site-footer a { color: var(--gold-light); text-underline-offset: 3px; }
.policy-back { margin-top: 40px; text-align: center; }
.site-footer p + p { margin-top: 6px; }
