
.t54-wrap,.t54-wrap *{box-sizing:border-box}
.t54-wrap{position:relative;z-index:1;width:100%;max-width:100%;margin:26px auto;padding:0;background:#fff;border:1px solid #e5e0d5;border-radius:20px;color:#202124;box-shadow:0 14px 38px rgba(27,31,42,.10);font-family:Arial,sans-serif;overflow:hidden;clear:both}
.t54-wrap button{position:relative;z-index:3;pointer-events:auto!important;appearance:none;-webkit-appearance:none;font-family:inherit}
.t54-intro{padding:34px 18px;text-align:center;background:linear-gradient(135deg,#fffdf8,#fcf5e8 38%,#f7efff)}
.t54-intro h2{margin:0 0 12px;color:#6f4c17;font:700 34px Georgia,serif}
.t54-intro p{max-width:720px;margin:0 auto 20px;color:#50463c;font-size:16px;line-height:1.65}
.t54-start{border:0!important;border-radius:12px!important;padding:14px 24px!important;background:linear-gradient(135deg,#d69a26,#8b5a13)!important;color:#fff!important;font-size:17px!important;font-weight:700!important;cursor:pointer!important;box-shadow:0 8px 18px rgba(152,96,19,.25)}
.t54-game{display:none;padding:18px}
.t54-game.is-open{display:block}
.t54-periods{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin:0 0 18px}
.t54-period{border:1px solid #d8c39a!important;background:#fffaf0!important;color:#6a4c1c!important;padding:10px 16px!important;border-radius:999px!important;cursor:pointer!important;font-weight:700!important;min-width:108px;font-size:14px}
.t54-period.active{background:linear-gradient(135deg,#d7a136,#8a5a15)!important;border-color:#8a5a15!important;color:#fff!important}
.t54-board,.t54-side{width:100%;background:#fff;border:1px solid #ece4d7;border-radius:16px;padding:16px}
.t54-board{margin-bottom:16px}
.t54-board-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px}
.t54-board-head h3{margin:0;color:#5a4015;font-size:24px;line-height:1.2}
.t54-count{color:#8a5a15;font-weight:800;font-size:17px;white-space:nowrap}
.t54-deck{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;width:100%}
.t54-pick{position:relative;display:block;width:100%;aspect-ratio:3/5;padding:0!important;border:0!important;background:transparent!important;perspective:1000px;cursor:pointer!important;overflow:visible}
.t54-pick:focus{outline:3px solid rgba(168,120,35,.35);outline-offset:3px}
.t54-inner{position:absolute;inset:0;transition:transform .65s;transform-style:preserve-3d}
.t54-pick.revealed .t54-inner{transform:rotateY(180deg)}
.t54-face{position:absolute;inset:0;backface-visibility:hidden;border-radius:11px;overflow:hidden;box-shadow:0 8px 16px rgba(68,47,13,.22);background:#2b1647}
.t54-face img{display:block;width:100%;height:100%;object-fit:cover}
.t54-front{transform:rotateY(180deg)}
.t54-shuffle-status{min-height:24px;margin-top:10px;text-align:center;color:#8a5a15;font-weight:700;opacity:0;transition:opacity .2s;font-size:14px}
.t54-shuffle-status.is-visible{opacity:1}
.t54-deck.is-shuffling .t54-pick{animation:t54-card-shuffle .7s ease both}
.t54-deck.is-shuffling .t54-pick:nth-child(2n){animation-direction:alternate-reverse}
.t54-deck.is-shuffling .t54-pick:nth-child(3n){animation-duration:.85s}
@keyframes t54-card-shuffle{
  0%{transform:translate(0,0) rotate(0deg) scale(1)}
  30%{transform:translate(8px,-12px) rotate(4deg) scale(.96)}
  55%{transform:translate(-10px,8px) rotate(-4deg) scale(.94)}
  80%{transform:translate(5px,-4px) rotate(2deg) scale(.98)}
  100%{transform:translate(0,0) rotate(0deg) scale(1)}
}
.t54-shuffle:disabled{opacity:.7!important;cursor:wait!important}
.t54-side{display:grid;grid-template-columns:1fr;gap:14px;align-items:start;margin-bottom:18px}
.t54-side h3{margin:0 0 10px;color:#5a4015;font:700 22px Georgia,serif}
.t54-side ol{margin:0;padding-left:22px;color:#333;line-height:1.8}
.t54-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;width:100%}
.t54-btn{display:block;width:100%;min-height:46px;border:0!important;border-radius:10px!important;padding:12px 14px!important;font-weight:700!important;font-size:14px!important;line-height:1.2!important;cursor:pointer!important;text-align:center!important;white-space:normal!important}
.t54-primary{background:linear-gradient(135deg,#d7a136,#8a5a15)!important;color:#fff!important}
.t54-secondary{background:#f7f1e5!important;color:#6b4d21!important;border:1px solid #dcc9a9!important}
.t54-show-reading{display:none!important;background:linear-gradient(135deg,#7a46a5,#523078)!important;color:#fff!important}
.t54-show-reading.is-ready{display:block!important}
.t54-reading{display:none;margin-top:24px}
.t54-reading.show{display:block}
.t54-reading>h3{margin:0 0 16px;color:#5a4015;font:700 28px Georgia,serif}
.t54-reading-grid{display:grid;grid-template-columns:1fr;gap:14px}
.t54-result{display:grid;grid-template-columns:160px minmax(0,1fr);gap:0;background:#fff;border:1px solid #e6ddcf;border-radius:15px;overflow:hidden;box-shadow:0 7px 18px rgba(34,37,45,.06)}
.t54-result img{display:block;width:100%;height:100%;min-height:260px;object-fit:cover;background:#f5e8c8}
.t54-result-body{padding:18px}
.t54-result h4{margin:0 0 5px;color:#5d4216;font-size:22px}
.t54-result small{display:block;color:#8a5a15;font-weight:700;margin-bottom:12px;font-size:14px}
.t54-result p{margin:0 0 11px;color:#2c2c2c;font-size:15px;line-height:1.68}
.t54-result p:last-child{margin-bottom:0}
.t54-summary{margin-top:18px;padding:20px;background:#fffaf0;border:1px solid #ead6a7;border-radius:15px;color:#242424;line-height:1.74}
.t54-summary h4{margin:0 0 10px;color:#8a5a15;font-size:22px}
.t54-summary p{margin:0 0 12px}
.t54-summary p:last-child{margin-bottom:0}
.t54-disclaimer{padding:14px 18px;text-align:center;color:#777;font-size:12px;background:#faf8f2;border-top:1px solid #eee}
@media(max-width:900px){
  .t54-actions{grid-template-columns:1fr}
}
@media(max-width:640px){
  .t54-game{padding:14px}
  .t54-deck{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  .t54-result{grid-template-columns:1fr}
  .t54-result img{height:auto;min-height:0;aspect-ratio:3/5}
  .t54-intro h2{font-size:28px}
  .t54-board-head h3{font-size:21px}
  .t54-period{min-width:90px;font-size:13px}
}
@media(max-width:420px){
  .t54-deck{grid-template-columns:repeat(2,minmax(0,1fr))}
}
