@charset "utf-8";
/* ============================================================
    引く・診断する占い（おみくじ・タロット・バイオリズム・名前の相性・前世・恋愛タイプ）
    ============================================================ */

:root{
    --omikujiRed: #c8324b;       /* おみくじの箱・朱色 */
    --omikujiPaper: #fffdf6;     /* おみくじの紙 */
    --omikujiShine: rgba(255, 255, 255, 0.18); /* おみくじの箱のふち */
    --omikujiStick: #e8c48a;     /* おみくじの棒 */
    --tarotNavy: #2d2a5a;        /* タロットのカードの地 */
    --tarotGold: #e2b94a;        /* タロットのカードの金 */
    --bioPhysical: #e8384f;      /* バイオリズム：体 */
    --bioEmotional: #2f9e44;     /* バイオリズム：心 */
    --bioIntellectual: #2a62b0;  /* バイオリズム：頭 */
}

/* ▼ おみくじ */
.omikujiStage{
    display: grid;
    justify-items: center;
    gap: var(--spaceSm);
    padding: var(--spaceLg) 0;
}
.omikujiBox{
    padding: 0;
    border-radius: var(--radiusMd);
}
.omikujiBox:focus-visible{
    outline: 3px solid var(--focusRing);
    outline-offset: 4px;
}
.omikujiBoxBody{
    position: relative;
    display: grid;
    place-items: center;
    width: 110px;
    height: 170px;
    border-radius: 12px 12px 8px 8px;
    background: var(--omikujiRed);
    box-shadow: inset 0 0 0 6px var(--omikujiShine), var(--shadowCard);
}
.omikujiBoxLabel{
    writing-mode: vertical-rl;
    padding: 0.6rem 0.3rem;
    border-radius: 4px;
    background: var(--omikujiPaper);
    color: var(--omikujiRed);
    font-weight: 700;
    letter-spacing: 0.2em;
}
.omikujiStick{
    position: absolute;
    top: -26px;
    left: 50%;
    width: 8px;
    height: 34px;
    margin-left: -4px;
    border-radius: 4px 4px 0 0;
    background: var(--omikujiStick);
    opacity: 0;
}
.omikujiBox.isShaking .omikujiBoxBody{
    animation: omikujiShake 0.3s ease-in-out 3;
}
.omikujiBox.isShaking .omikujiStick{
    animation: omikujiStick 0.9s ease forwards;
}
.omikujiHint{
    margin: 0;
    font-size: 0.875rem;
    color: var(--textSub);
}
.omikujiPaper{
    max-width: 520px;
    margin: 0 auto var(--spaceLg);
    padding: var(--spaceXl);
    border: 2px solid var(--omikujiRed);
    border-radius: 4px;
    background: var(--omikujiPaper);
    box-shadow: var(--shadowCard);
    text-align: center;
    animation: fortuneFadeUp 0.4s var(--easeOut);
}
.omikujiNumber{
    margin: 0;
    font-size: 0.875rem;
    color: var(--textSub);
}
.omikujiRank{
    margin: var(--spaceXs) 0 var(--spaceSm);
    font-size: clamp(2.5rem, 10vw, 3.5rem);
    font-weight: 700;
    color: var(--omikujiRed);
    letter-spacing: 0.1em;
}
.omikujiRank[data-level="0"]{
    color: var(--textMain);
}
.omikujiPoem{
    margin: 0 0 var(--spaceLg);
    font-size: 0.9375rem;
    line-height: 1.9;
}
.omikujiList{
    display: grid;
    gap: 0;
    margin: 0 0 var(--spaceMd);
    border-top: 1px solid var(--line);
    text-align: left;
}
.omikujiList div{
    display: grid;
    grid-template-columns: 5.5em minmax(0, 1fr);
    gap: var(--spaceSm);
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--line);
}
.omikujiList dt{
    font-weight: 700;
    color: var(--omikujiRed);
}
.omikujiList dd{
    margin: 0;
}
.omikujiLucky{
    margin: 0;
    font-size: 0.875rem;
    font-weight: 700;
}

/* ▼ タロット */
.tarotTable{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spaceLg);
    margin: var(--spaceLg) 0;
}
.tarotCard{
    display: grid;
    justify-items: center;
    gap: var(--spaceXs);
    animation: tarotFlip 0.5s var(--easeOut) both;
}
.tarotPosition{
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--catText);
}
.tarotFace{
    display: grid;
    grid-template-rows: auto 1fr auto;
    justify-items: center;
    align-items: center;
    width: 128px;
    height: 200px;
    padding: 0.6rem 0.4rem;
    border: 3px solid var(--tarotGold);
    border-radius: 10px;
    background: var(--tarotNavy);
    box-shadow: inset 0 0 0 4px var(--tarotNavy), inset 0 0 0 5px var(--tarotGold), var(--shadowCard);
    color: var(--tarotGold);
}
.tarotCard.isReversed .tarotFace{
    transform: rotate(180deg);
}
.tarotNum{
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}
.tarotSymbol{
    font-size: 3rem;
    line-height: 1;
}
.tarotName{
    font-weight: 700;
    font-size: 0.9375rem;
}
.tarotDir{
    font-size: 0.75rem;
    color: var(--textSub);
}
.tarotText{
    margin-bottom: var(--spaceLg);
    padding: var(--spaceLg);
    border-radius: var(--radiusMd);
    background: var(--catSoft);
}
.tarotText h3{
    margin: 0 0 var(--spaceXs);
    font-size: 1rem;
}
.tarotKey{
    margin: 0 0 var(--spaceXs);
    font-weight: 700;
    color: var(--catText);
}
.tarotText p:last-child{
    margin-bottom: 0;
}

/* ▼ バイオリズム */
.bioToday{
    margin: var(--spaceLg) 0;
}
.bioDays{
    margin: 0 0 var(--spaceSm);
    font-size: 0.875rem;
    color: var(--textSub);
}
.bioNow{
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--spaceSm);
    padding: 0;
    list-style: none;
}
.bioNowItem{
    display: grid;
    justify-items: center;
    gap: 2px;
    margin: 0;
    padding: var(--spaceMd) var(--spaceXs);
    border-top: 4px solid currentColor;
    border-radius: var(--radiusSm);
    background: var(--bgCard);
    box-shadow: inset 0 0 0 1px var(--line);
    text-align: center;
}
.bioNowItem.isPhysical{ color: var(--bioPhysical); }
.bioNowItem.isEmotional{ color: var(--bioEmotional); }
.bioNowItem.isIntellectual{ color: var(--bioIntellectual); }
.bioNowName{
    font-weight: 700;
}
.bioNowValue{
    font-size: 1.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.bioNowWord{
    font-size: 0.75rem;
    color: var(--textMain);
}
.bioChart{
    margin: 0;
}
.bioSvg{
    display: block;
    width: 100%;
    height: auto;
}
.bioAxis{
    stroke: var(--lineStrong);
    stroke-width: 1;
}
.bioTodayLine{
    stroke: var(--textSub);
    stroke-dasharray: 4 4;
}
.bioLine{
    fill: none;
    stroke-width: 2.5;
}
.bioLine.isPhysical{ stroke: var(--bioPhysical); }
.bioLine.isEmotional{ stroke: var(--bioEmotional); }
.bioLine.isIntellectual{ stroke: var(--bioIntellectual); }
.bioLabel{
    fill: var(--textSub);
    font-size: 11px;
}
.bioLegend{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spaceLg);
    font-size: 0.8125rem;
}
.bioKey::before{
    content: "";
    display: inline-block;
    width: 1.2em;
    height: 3px;
    margin-right: 0.4em;
    vertical-align: middle;
    background: currentColor;
}
.bioKey.isPhysical{ color: var(--bioPhysical); }
.bioKey.isEmotional{ color: var(--bioEmotional); }
.bioKey.isIntellectual{ color: var(--bioIntellectual); }

/* ▼ 名前の相性 */
.nameAishouForm{
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: end;
    gap: var(--spaceMd);
}
.nameAishouForm .field{
    margin: 0;
}
.nameAishouForm .btn{
    grid-column: 1 / -1;
    justify-self: center;
}
.nameAishouHeart{
    padding-bottom: 0.6rem;
    color: var(--accent);
    font-size: 1.5rem;
}
@media (max-width: 719px){
    .nameAishouForm{
        grid-template-columns: minmax(0, 1fr);
    }
    .nameAishouHeart{
        justify-self: center;
        padding: 0;
    }
}
.nameResult{
    margin-top: var(--spaceLg);
    padding: var(--spaceXl) var(--spaceLg);
    border-radius: var(--radiusLg);
    background: var(--accentSoft);
    text-align: center;
    animation: fortuneFadeUp 0.4s var(--easeOut);
}
.nameScoreLabel{
    margin: 0;
    font-weight: 700;
}
.nameScore{
    margin: var(--spaceXs) 0;
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--accentText);
    line-height: 1.1;
}
.nameScore small{
    font-size: 1.25rem;
}
.nameParts{
    display: grid;
    gap: var(--spaceSm);
    max-width: 380px;
    margin: var(--spaceLg) auto;
    padding: 0;
    list-style: none;
}
.nameParts li{
    display: grid;
    grid-template-columns: 3em minmax(0, 1fr) 3em;
    align-items: center;
    gap: var(--spaceSm);
    margin: 0;
}
.nameBar{
    height: 10px;
    border-radius: var(--radiusPill);
    background: var(--bgCard);
    overflow: hidden;
}
.nameBar span{
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--accent);
}
.nameSteps{
    font-size: 0.8125rem;
    text-align: left;
}
.nameSteps summary{
    cursor: pointer;
    color: var(--accentText);
}
.nameStepsBody{
    margin-top: var(--spaceSm);
    font-family: var(--fontMono);
    text-align: center;
}
.nameStepsBody p{
    margin: 0;
    letter-spacing: 0.15em;
}

/* ▼ 前世・恋愛タイプの結果 */
.zenseResult,
.loveResult{
    margin-top: var(--spaceLg);
    padding: var(--spaceXl) var(--spaceLg);
    border-radius: var(--radiusLg);
    background: var(--catSoft);
    animation: fortuneFadeUp 0.4s var(--easeOut);
}
.zenseLead,
.loveResultLead{
    margin: 0;
    font-size: 0.875rem;
    color: var(--textSub);
    text-align: center;
}
.zenseTitle,
.loveResultName{
    margin: var(--spaceXs) 0 var(--spaceMd);
    font-size: 1.15rem;
    text-align: center;
    color: var(--catText);
}
.zenseTitle strong,
.loveResultName{
    font-size: 1.6rem;
    font-weight: 700;
}
.zenseList{
    display: grid;
    gap: var(--spaceSm);
    margin: var(--spaceMd) 0 0;
}
.zenseList div{
    padding: var(--spaceMd);
    border-radius: var(--radiusSm);
    background: var(--bgCard);
}
.zenseList dt{
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--catText);
}
.zenseList dd{
    margin: 0;
}

/* ▼ 恋愛タイプ：質問 */
.quizProgress{
    height: 8px;
    border-radius: var(--radiusPill);
    background: var(--bgMuted);
    overflow: hidden;
}
.quizProgress span{
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--catColor);
    transition: width var(--durationPanel) var(--easeOut);
}
.quizCount{
    margin: var(--spaceSm) 0;
    font-size: 0.875rem;
    color: var(--textSub);
}
.loveQ{
    margin: 0 0 var(--spaceMd);
    font-size: 1.2rem;
    font-weight: 700;
}
.loveChoices{
    display: grid;
    gap: var(--spaceSm);
}
.loveChoice{
    min-height: 52px;
    padding: 0.6rem 1rem;
    border: 2px solid var(--line);
    border-radius: var(--radiusMd);
    background: var(--bgCard);
    font-weight: 700;
    text-align: left;
}
.loveChoice:focus-visible{
    outline: 3px solid var(--focusRing);
    outline-offset: 2px;
}
@media (hover: hover){
    .loveChoice:hover{
        border-color: var(--catColor);
        background: var(--catSoft);
    }
}
.loveAxes{
    display: grid;
    gap: var(--spaceSm);
    margin: var(--spaceLg) 0;
    padding: 0;
    list-style: none;
}
.loveAxes li{
    display: grid;
    grid-template-columns: 4em minmax(0, 1fr) 4em;
    align-items: center;
    gap: var(--spaceSm);
    margin: 0;
    font-size: 0.8125rem;
}
.loveAxisRight{
    text-align: right;
}
.loveAxisBar{
    position: relative;
    height: 8px;
    border-radius: var(--radiusPill);
    background: var(--bgCard);
}
.loveAxisBar span{
    position: absolute;
    top: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border-radius: 50%;
    background: var(--catColor);
    box-shadow: 0 0 0 3px var(--bgCard);
}

/* ▼ 動き */
@keyframes omikujiShake{
    0%, 100%{ transform: rotate(0); }
    25%{ transform: rotate(-12deg); }
    75%{ transform: rotate(12deg); }
}
@keyframes omikujiStick{
    0%, 70%{ opacity: 0; transform: translateY(20px); }
    100%{ opacity: 1; transform: translateY(0); }
}
@keyframes tarotFlip{
    from{ opacity: 0; transform: rotateY(90deg); }
    to{ opacity: 1; transform: rotateY(0); }
}
@keyframes fortuneFadeUp{
    from{ opacity: 0; transform: translateY(10px); }
    to{ opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce){
    .omikujiBox.isShaking .omikujiBoxBody,
    .omikujiBox.isShaking .omikujiStick,
    .tarotCard,
    .omikujiPaper,
    .nameResult,
    .zenseResult,
    .loveResult{
        animation: none;
    }
    .omikujiStick{
        opacity: 1;
    }
}
