/* カード選択の儀式（呼吸→シャッフル→選ぶ→めくる） */
.sound-toggle { margin-top: 14px; border: 0; padding: 4px 0; font-size: .85rem; color: var(--text-2); }
.ritual { min-height: calc(100svh - 120px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px 0 40px; animation: fade .7s ease both; }
.ritual-lead { font-family: var(--serif); font-size: 1.25rem; letter-spacing: .12em; color: var(--champagne); margin-bottom: 10px; }
.ritual-text { color: var(--text-2); font-size: .92rem; min-height: 3.4em; }

/* 1. 呼吸 */
.breath { position: relative; width: 200px; height: 200px; margin: 26px auto 18px; }
.breath-ring, .breath-core { position: absolute; inset: 0; border-radius: 50%; }
.breath-ring { border: 1px solid var(--line); }
.breath-core { inset: 50px; background: radial-gradient(circle, rgba(232, 214, 167, .9), rgba(212, 175, 55, .25) 55%, transparent 72%); animation: breathe 8s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scale(.55); opacity: .55; } 45%, 55% { transform: scale(1.5); opacity: 1; } }

/* 2. シャッフル */
.deck { position: relative; width: 120px; height: 198px; margin: 30px auto 22px; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; outline: none; }
.deck .dc { position: absolute; inset: 0; transition: transform .25s ease; }
.deck .dc svg { width: 100%; height: 100%; border-radius: 8px; box-shadow: 0 6px 18px rgba(0, 0, 0, .55); }
.deck.holding { cursor: grabbing; filter: drop-shadow(0 0 22px rgba(232, 214, 167, .35)); }
.deck.holding .dc:nth-child(odd) { animation: riffleL .38s ease-in-out infinite; }
.deck.holding .dc:nth-child(even) { animation: riffleR .38s ease-in-out infinite; }
.deck.holding .dc:nth-child(3n) { animation-delay: .12s; }
@keyframes riffleL { 50% { transform: translateX(-58px) rotate(-12deg) translateY(-6px); } }
@keyframes riffleR { 50% { transform: translateX(58px) rotate(12deg) translateY(-10px); } }
.shuffle-meter { width: 180px; height: 3px; border-radius: 3px; background: rgba(212, 175, 55, .15); overflow: hidden; margin: 6px auto 20px; }
.shuffle-meter span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--champagne), var(--gold)); transition: width .2s; }

/* 3. 78枚のストリップ */
.strip-wrap { position: relative; width: 100vw; margin: 8px calc(50% - 50vw) 0; }
.strip-light { position: absolute; left: 50%; top: 0; width: 120px; height: 100%; transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(ellipse at 50% 60%, rgba(232, 214, 167, .18), transparent 70%); }
.strip { display: flex; align-items: flex-end; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; height: 230px; padding: 0 calc(50vw - 36px) 18px; -webkit-overflow-scrolling: touch; }
.strip::-webkit-scrollbar { display: none; }
.strip .sc { flex: none; width: 72px; height: 119px; margin-right: -44px; border: 0; padding: 0; background: none; cursor: pointer; transform-origin: 50% 100%;
  transition: opacity .3s, filter .2s; will-change: transform; }
.strip .sc svg { width: 100%; height: 100%; border-radius: 6px; box-shadow: -3px 4px 10px rgba(0, 0, 0, .55); }
.strip .sc.focus svg { box-shadow: 0 0 0 1px var(--champagne), 0 0 24px rgba(232, 214, 167, .55); }
.strip .sc.gone { opacity: 0; pointer-events: none; }
.strip .sc:last-child { margin-right: 0; }

.slots { display: flex; justify-content: center; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.slot2 { width: 72px; text-align: center; font-size: .7rem; color: var(--text-2); line-height: 1.4; }
.slot2 .hole { width: 72px; height: 119px; border: 1px dashed var(--line); border-radius: 6px; margin-bottom: 6px; display: grid; place-items: center; font-family: var(--serif); color: var(--gold); }
.slot2.next .hole { border-style: solid; border-color: var(--gold); box-shadow: 0 0 16px rgba(212, 175, 55, .25) inset; animation: pulse 2s ease-in-out infinite; }
.slot2 .hole svg { width: 100%; height: 100%; border-radius: 6px; animation: land .5s cubic-bezier(.2, .9, .3, 1.2) both; }
@keyframes land { from { transform: translateY(-60px) scale(1.3); opacity: 0; } }
@keyframes pulse { 50% { box-shadow: 0 0 24px rgba(212, 175, 55, .45) inset; } }

/* 確認シート */
.sheet { position: fixed; inset: 0; z-index: 50; background: rgba(6, 4, 12, .78); backdrop-filter: blur(6px); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; animation: fade .25s ease both; }
.sheet[hidden] { display: none; }
.sheet-card { width: 150px; height: 248px; animation: rise .45s cubic-bezier(.2, .9, .3, 1.1) both; filter: drop-shadow(0 0 30px rgba(232, 214, 167, .35)); }
.sheet-card svg { width: 100%; height: 100%; border-radius: 10px; }
@keyframes rise { from { transform: translateY(80px) scale(.6); opacity: 0; } }
.sheet-q { margin: 22px 0 18px; font-family: var(--serif); color: var(--champagne); text-align: center; }
.sheet-btns { display: flex; gap: 12px; }

/* 4. めくる */
.table { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin: 22px 0 26px; }
.tcard { width: 100px; text-align: center; }
.tcard .pos { font-size: .74rem; color: var(--text-2); margin-bottom: 6px; min-height: 2.6em; line-height: 1.3; display: flex; align-items: flex-end; justify-content: center; }
.tcard .flip { width: 100px; height: 165px; cursor: pointer; position: relative; border: 0; padding: 0; background: none; }
.tcard .flip:not(.on) { animation: wait 2.4s ease-in-out infinite; }
@keyframes wait { 50% { transform: translateY(-4px); filter: drop-shadow(0 0 10px rgba(232, 214, 167, .3)); } }
.tcard .flip.charging { animation: charge .7s ease-in both; }
@keyframes charge { to { transform: scale(1.08); filter: drop-shadow(0 0 28px rgba(232, 214, 167, .9)) brightness(1.3); } }
.tcard .flip .inner { transition-duration: 1.1s; }
.tcard .name { margin-top: 8px; font-family: var(--serif); color: var(--champagne); font-size: .86rem; min-height: 1.4em; opacity: 0; transition: opacity .6s .5s; }
.tcard .kw { font-size: .7rem; color: var(--text-2); opacity: 0; transition: opacity .6s .8s; }
.tcard.done .name, .tcard.done .kw { opacity: 1; }
.burst { position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; border-radius: 50%; background: var(--champagne); pointer-events: none; animation: burst .9s ease-out forwards; }
@keyframes burst { to { transform: translate(var(--x), var(--y)) scale(.2); opacity: 0; } }

@media (prefers-reduced-motion: reduce) { .breath-core { transform: scale(1); opacity: .9; } }

/* 1枚ずつのめくりと解説 */
.big { position: relative; width: 170px; height: 281px; margin: 18px auto 10px; }
.big .flip { width: 100%; height: 100%; border: 0; padding: 0; background: none; cursor: pointer; perspective: 900px; display: block; }
.big .flip:not(.on):not(.charging) { animation: wait 2.4s ease-in-out infinite; }
.big .flip.charging { animation: charge .9s ease-in both; }
.big .flip .inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 1.2s cubic-bezier(.3, .7, .2, 1); }
.big .flip.on .inner { transform: rotateY(180deg); }
.big .face { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 10px; overflow: hidden; }
.big .front { transform: rotateY(180deg); }
.big .face svg { width: 100%; height: 100%; }
.explain { width: 100%; text-align: left; margin-top: 14px; animation: fade .8s ease both; }
.explain h3 { margin-bottom: 4px; }
.explain .lead { font-size: .8rem; color: var(--gold); margin-bottom: 10px; }
.explain .sub { font-size: .8rem; color: var(--champagne); margin: 12px 0 2px; }
.explain .line { opacity: 0; animation: fade .7s ease forwards; }
.explain .next { margin-top: 18px; text-align: center; opacity: 0; animation: fade .8s ease forwards; }
.explain .think { font-size: .86rem; color: var(--text-2); margin-bottom: 12px; }
.drawn { display: flex; justify-content: center; gap: 10px; margin-top: 22px; }
.drawn .mini { width: 46px; text-align: center; font-size: .62rem; color: var(--text-2); line-height: 1.3; }
.drawn .mini svg { width: 46px; height: 76px; border-radius: 4px; }
.drawn .mini.empty .ph { width: 46px; height: 76px; border: 1px dashed var(--line); border-radius: 4px; }
.table .tcard svg { width: 100px; height: 165px; border-radius: 8px; }
.table .tcard { animation: land .6s cubic-bezier(.2, .9, .3, 1.2) both; }
.table .tcard:nth-child(2) { animation-delay: .25s; } .table .tcard:nth-child(3) { animation-delay: .5s; }
.table .tcard .name { opacity: 1; }
.ritual[hidden] { display: none; }
@keyframes appear { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.explain .line, .explain .next { animation: appear .8s ease forwards; }
.big { transition: width .8s ease, height .8s ease, margin .8s ease; }
.big.shrink { width: 110px; height: 182px; margin: 4px auto 0; }
#step-reveal { justify-content: flex-start; padding-top: 18px; }
#reveal-guide:empty { display: none; }

/* 結果：寄り添いメッセージと「もっと詳しく」 */
.care { border-color: rgba(232, 214, 167, .45); background: linear-gradient(180deg, rgba(57, 37, 82, .55), rgba(23, 17, 38, .8)); }
.care p { margin: 0; line-height: 2; }
.offer h3:first-child { text-align: center; }
.offer-main { border: 1px solid var(--gold); border-radius: 12px; padding: 18px; margin: 14px 0 18px; background: rgba(212, 175, 55, .05); }
.sub-h { font-size: .85rem; color: var(--text-2); margin: 6px 0 10px; }
.offer-links { display: grid; gap: 8px; }
.offer-link { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--text); background: rgba(11, 9, 20, .4); }
.offer-link b { font-family: var(--serif); font-weight: 600; color: var(--champagne); }
.offer-link span { grid-column: 1; font-size: .8rem; color: var(--text-2); }
.offer-link em { grid-row: 1 / span 2; grid-column: 2; font-style: normal; font-size: .72rem; color: var(--gold); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.offer-link.soon { opacity: .6; }

/* ---- 13枚（年運）用のコンパクト表示 ---- */
.slots.many { gap: 6px; }
.slots.many .slot2 { width: 40px; font-size: .58rem; }
.slots.many .slot2 .hole { width: 40px; height: 66px; font-size: .8rem; }
.drawn.many { flex-wrap: wrap; gap: 5px; }
.drawn.many .mini { width: 34px; font-size: .55rem; }
.drawn.many .mini svg, .drawn.many .mini.empty .ph { width: 34px; height: 56px; }
.table.many { gap: 8px; }
.table.many .tcard { width: 72px; }
.table.many .tcard svg { width: 72px; height: 119px; }
.table.many .tcard .name { font-size: .7rem; }
.table.many .tcard:first-child { width: 100%; display: flex; flex-direction: column; align-items: center; }
.table.many .tcard:first-child svg { width: 110px; height: 181px; }
