/* ---------- 今日の一枚：回る輪から一枚をつまむ（旧 hiku.html の仕掛けを移植） ---------- */
.hiku .theme-lead { max-width: 640px; margin: -20px auto 0; text-align: center; font-size: .9rem; line-height: 2; letter-spacing: .1em; color: var(--ink-soft); }
.hiku .theme-lead strong { font-weight: 500; color: var(--gold-deep); }
.theme-chips { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; max-width: 820px; margin: 22px auto 0; }
.theme-chip { border: 1px solid rgba(201,161,90,.5); background: #fff; color: var(--ink); font-family: var(--serif); padding: 8px 15px 9px; border-radius: 14px; cursor: pointer; transition: all .3s var(--ease); display: flex; flex-direction: column; align-items: center; gap: 2px; line-height: 1.35; min-width: 74px; }
.theme-chip .tc-name { font-size: 1rem; letter-spacing: .16em; text-indent: .16em; }
.theme-chip .tc-hint { font-size: .66rem; letter-spacing: .06em; color: var(--ink-soft); white-space: nowrap; }
.theme-chip:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(201,161,90,.18); }
.theme-chip.on { background: linear-gradient(135deg, #d9b56b, #efd9a2); border-color: transparent; color: #fff; box-shadow: 0 8px 20px rgba(201,161,90,.28); }
.theme-chip.on .tc-hint { color: rgba(255,255,255,.85); }
.theme-chip.wide { min-width: 0; }
.theme-desc { min-height: 1.8em; margin-top: 18px; text-align: center; font-size: .92rem; color: var(--gold-deep); letter-spacing: .12em; }

.deck-area { margin: 40px auto 0; min-height: 520px; text-align: center; }
.hdeck { position: relative; width: 230px; height: 334px; margin: 0 auto; cursor: pointer; touch-action: pan-y pinch-zoom; user-select: none; -webkit-user-select: none; }
.hdeck.orbiting { cursor: grab; }
.hdeck.spinning { cursor: grabbing; }

/* カードの裏（光へ続く森の道） */
.card-back, .hdeck .stack { position: absolute; inset: 0; border-radius: 10px; background: #dfe9ea url(../images/card-back.jpg) center / cover no-repeat; box-shadow: 0 16px 40px rgba(44,58,64,.2), inset 0 0 0 1px rgba(255,255,255,.4); }
.card-back { overflow: hidden; }
.hdeck .stack.s1 { transform: rotate(-4.5deg) translate(-9px, 5px); }
.hdeck .stack.s2 { transform: rotate(3.5deg) translate(8px, 3px); }
.hdeck .stack.s3 { transform: rotate(-1.5deg) translate(2px, -3px); }
.hdeck:not(.fanning):not(.orbiting) .stack.s3 { animation: breathe3 5s ease-in-out infinite; }
@keyframes breathe3 { 0%,100% { transform: rotate(-1.5deg) translate(2px, -3px) } 50% { transform: rotate(-1.5deg) translate(2px, -9px) } }

/* ゆっくり回る輪 */
.swirl { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity .5s ease; --chipW: 112px; --chipH: 163px; --r: 98px; }
.hdeck.fanning .swirl, .hdeck.orbiting .swirl { opacity: 1; pointer-events: auto; }
.swirl .chip { position: absolute; left: 50%; top: 50%; width: var(--chipW); height: var(--chipH); margin-left: calc(var(--chipW) / -2); margin-top: calc(var(--chipH) / -2); padding: 0; border: 0; border-radius: 8px; cursor: pointer; background: #dfe9ea url(../images/card-back-sm.jpg) center / cover no-repeat; box-shadow: 0 8px 22px rgba(44,58,64,.22), inset 0 0 0 1px rgba(255,255,255,.35); transition: box-shadow .3s ease, filter .3s ease, opacity .55s ease; }
.hdeck.orbiting .swirl .chip:hover, .hdeck.orbiting .swirl .chip:focus-visible { box-shadow: 0 0 0 2px var(--gold), 0 16px 34px rgba(44,58,64,.3); filter: brightness(1.08); outline: none; z-index: 5; }
.swirl .chip.gone { opacity: 0; pointer-events: none; }
.swirl .chip.picked { z-index: 9; pointer-events: none; }
.hdeck.fanning .swirl .chip { animation: fan 1.4s cubic-bezier(.22,.75,.25,1) both; }
.hdeck.orbiting .swirl .chip { animation: none; }
.hdeck.spinning .swirl .chip { transition: none; }
.hdeck.fanning .flip-box, .hdeck.orbiting .flip-box, .hdeck.fanning .stack, .hdeck.orbiting .stack { opacity: 0; pointer-events: none; }
.hdeck .stack, .flip-box { transition: opacity .5s ease; }
@keyframes fan {
  0%   { transform: rotate(var(--a)) translateX(0) rotate(calc(-1 * var(--a))); }
  100% { transform: rotate(calc(var(--a) + 360deg)) translateX(var(--r)) rotate(calc(-1 * (var(--a) + 360deg))); }
}
@media (max-width: 430px) { .swirl { --chipW: 94px; --chipH: 137px; --r: 82px; } }
@media (prefers-reduced-motion: reduce) { .hdeck.fanning .swirl .chip { animation-duration: .5s; } }

/* 中央でめくる */
.flip-box { perspective: 1200px; width: 230px; height: 334px; margin: 0 auto; position: relative; }
.flip-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .9s cubic-bezier(.2,.7,.3,1); }
.flip-box.open .flip-inner { transform: rotateY(180deg); }
.flip-face { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 10px; overflow: hidden; }
.flip-face.front { transform: rotateY(180deg); }
.flip-face.front img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; box-shadow: 0 18px 44px rgba(44,58,64,.22); }
.hdeck .burst { z-index: 1; }

.hiku-hint { margin-top: 22px; font-size: .9rem; color: var(--ink-soft); letter-spacing: .14em; min-height: 1.8em; }
.result-area { max-width: 560px; margin: 26px auto 0; display: none; }
.result-area.show { display: block; animation: fadein 1.2s var(--ease); }
@keyframes fadein { from { opacity: 0; transform: translateY(10px) } to { opacity: 1; transform: none } }
.result-area .num { font-family: var(--roman); letter-spacing: .3em; color: var(--gold-deep); font-size: .8rem; }
.result-area .name { font-size: 1.6rem; letter-spacing: .2em; font-weight: 500; margin: 6px 0 2px; }
.result-area .msg { font-size: 1.08rem; letter-spacing: .16em; color: var(--ink-soft); margin-top: 10px; line-height: 2.1; }
.result-area .acts { margin-top: 22px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
