.tarot-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.tarot-card {
    width: 200px;
    height: 408px;
    perspective: 1000px;
    cursor: pointer;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}


.card-front, .card-back {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
	background:#f7f7f7;
	padding:8px 16px 20px;
}

.card-front {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.card-front img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.click-hint {
    color: #000000;
    margin-top: 20px;
    font-size: 14px;
}

.card-back {
	position:absolute;
    display: none;
    flex-direction: column;
	left:0;
	top:0;
}

.card-back img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 10px;
}

.card-back img.reversed {
    transform: scaleY(-100%);
}

.card-info h3 {
    margin: 0 0 8px 0;
    color: #000000;
    font-size: 16px;
}

.orientation {
    color: var(--main-color);
    font-weight: bold;
    margin: 3px 0;
    font-size: 12px;
}

.meaning {
    color: #000000;
    font-size: 12px;
    line-height: 1.3;
    margin: 0;
}

.tarot-card.flipped .card-back {
    animation: flip 0.5s;
	display:flex;
}

.tarot-card .card-front
{
	display: flex;
    animation: flip 0.3s;
}

.tarot-card.flipped .card-front {
	display:none;
}

@keyframes flip {  from{ transform: rotateY(180deg); opacity:0; } to {transform: rotateY(0deg); opacity:1;}}

.omikuji-hex {
  position: relative;
  width: 120px;
  height: 220px;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  cursor:pointer;
  z-index:1;
  font-family: 'KoPubWorld Batang';
}

.hex-side {
  width: 20px;
  height: 100%;
  background: #c99d66;
  transform: skewY(32deg);
  border-bottom: 5px solid #bd1d2f;
  border-top: 6px solid #bd1d2f;
  z-index: 2;
  position: relative;
}

.hex-side.right {
  transform: skewY(-32deg);
}

.hex-center {
  width: 80px;
  height: 100%;
  background: #e8be86;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  border-bottom: 5px solid #bd1d2f;
  border-top: 6px solid #bd1d2f;
  transform: translateY(7px);
  z-index: 2;
}

.hex-center .text {
  writing-mode: vertical-rl;
  font-size: 24px;
  font-weight: bold;
  color: #000;
}

.hex-top-face {
  position: absolute;
  width: 100%;
  height: 30px;
  background: #d4a66a;
  clip-path: polygon(25% 0%, 75% 0%, 100% 41%, 82% 88%, 18% 88%, 0% 41%);
  left: 0;
  z-index: 3;
}

.hex-top-face {
  top: -18px;
  box-sizing: border-box;
}

.hex-hole{    
    display: block;
    width: 16px;
    height: 8px;
    background: #333;
    border-radius: 100%;
    position: absolute;
    right: 28px;
    top: 8px; 
    border:none;
}

.fortune-result {
    position: absolute;
    width: 200px;
    height: 0;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    z-index: 5;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
	animation:wide 0.3s forwards;
	opacity:0;
}

@keyframes wide {  from{ height:0; opacity:0; } to {height:300px; opacity:1;}}

.fortune-result.show {
    display: flex;
}

.fortune-result:after{
	content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(236, 178, 186, 0), 50%, #eeeeee, 51%, rgba(236, 178, 186, 0)), linear-gradient(to right, rgba(236, 178, 186, 0), 50%, #eeeeee, 51%, rgba(236, 178, 186, 0));
	left:0;
	top:0;
}

.fortune-content {
    text-align: center;
    font-family: 'KoPubWorld Batang';
    color: #333;
}

.fortune-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--main-color);
}

.fortune-text {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 10px;
}

.fortune-luck {
    font-size: 16px;
    font-weight: bold;
    margin-top: 15px;
    padding: 8px 16px;
    border-radius: 20px;
    background: #f0f0f0;
}

.cookie-container {
    position: relative;
    display: inline-block;
}

.cookie-img {
    transition: opacity 0.5s ease;
	cursor:pointer;
}

.fortune-paper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scaleX(0);
	background:white;
    padding: 32px 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 3;
    min-width: 300px;
    text-align: center;
    transform-origin: center top;
    transition: transform 0.6s ease-out;
}

.fortune-paper:after{
	content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(236, 178, 186, 0), 50%, #eeeeee, 51%, rgba(236, 178, 186, 0)), linear-gradient(to right, rgba(236, 178, 186, 0), 50%, #eeeeee, 51%, rgba(236, 178, 186, 0));
	left:0;
	top:0;
}

.fortune-paper.unfold {
    transform: translate(-50%, -50%) scaleX(1);
}

.fortune-content h3 {
    color: var(--main-color);
    margin-bottom: 15px;
    font-size: 20px;
}

.fortune-content p {
    color: #000000;
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
}