/* body {
    font-family: "Hiragino Maru Gothic ProN", "メイリオ", sans-serif;
    background-color: #fff5f7;
    margin: 0;
    padding: 8px;
} */

.main-container {
    display: flex;
    flex-direction: column;
    max-width: 550px;
    margin: 0 auto;
    gap: 8px;
}

.calendar-container {
    background-color: white;
    border-radius: 15px;
    padding: 12px;
    box-shadow: 0 0 15px rgb(255 48 79 / 30%);
}

.stats-container {
    background-color: white;
    /* padding: 20px; */
    border-radius: 10px;
    box-shadow: 0 0 15px rgb(255 48 79 / 30%);
    position: relative;  /* 追加：子要素の配置の基準点とする */
    /* margin-bottom: 10px; */
}

.stats-title {
    color: #ff8da1;
    font-size: 16px;
    margin-bottom: 10px;
    text-align: center;
    font-weight: bold;
}

.stats-flex {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
}

.stats-item {
    margin: 0;
    padding: 7px 0px;
    font-size: medium;
    white-space: nowrap;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    font-weight: bold;
    color: #666;
    text-decoration: underline;
}

/* 画面幅が350px以上の場合のスタイル */
@media (min-width: 380px) {
    .stats-flex {
        flex-direction: row;
        justify-content: space-between;
        align-items: centert;
        flex-wrap: nowrap;
    }
}

.ranking-container {
    background-color: white;
    padding: 12px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgb(255 48 79 / 30%);
    margin-bottom: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.ranking-list-container {
    position: relative;
    flex: 1;
}

.greeting-title {
    color: #ff8da1;
    font-size: 20px;
    margin-top: 10px;
    text-align: center;
    font-weight: bold;
}

.ranking-list {
    list-style: none;
    padding: 0;
    margin: 0;
    height: 170px;
    overflow-y: auto;
    /* スクロールバーのスタイリング */
    scrollbar-width: thin;
    scrollbar-color: #ffb6c1 #fff5f7;
}

/* Webkit（Chrome, Safari）用のスクロールバースタイル */
.ranking-list::-webkit-scrollbar {
    width: 8px;
}

.ranking-list::-webkit-scrollbar-track {
    background: #fff5f7;
    border-radius: 4px;
}

.ranking-list::-webkit-scrollbar-thumb {
    background-color: #ffb6c1;
    border-radius: 4px;
}

.ranking-item {
    padding: 6px 0;
    border-bottom: 1px solid #ffb6c1;
    font-size: 13px;
}

/* 最後の項目のボーダーを消す */
.ranking-item:last-child {
    border-bottom: none;
}

/* h1 {
    color: #ff8da1;
    text-align: center;
    font-size: 20px;
    margin: 10px 0 15px;
    font-weight: bold;
} */

.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 15px;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}

.calendar-header div {
    text-align: center;
    font-weight: bold;
    color: #666;
    font-size: 14px;
    padding: 5px 0;
}

.calendar-day {
    aspect-ratio: 1;
    font-size: medium;
    border: 2px solid #ffb6c1;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    background-color: white;
    transition: all 0.3s ease;
    min-height: 20px;
    color: #666;
}

.calendar-day:empty {
    border-color: transparent;
    background-color: transparent;
    cursor: default;
}

.calendar-day:hover:not(:empty) {
    background-color: #fff0f5;
    transform: scale(1.05);
}

.calendar-day.has-stamp {
    background-size: 95% 95%;
    background-repeat: no-repeat;
    background-position: center;
    color: transparent;
    border: 2px solid #ffb6c1;
}

.calendar-day.today {
    border-color: #ff8da1;
    border-width: 3px;
    font-weight: bold;
    color: #ff8da1;
}

.calendar-day.holiday {
    background-color: #f5dce0;
    color: #999;
}

.character {
    /* position: fixed;
    right: 20px;
    bottom: 20px;
    transform: scaleX(-1);
    z-index: 1;
    pointer-events: none; */
    z-index: 1000;
    height: auto;  /* 高さは比率を維持 */
    position: fixed;
    /* bottom: -50px;
    right: -50px; */
    display: none;
}


.celebration {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    z-index: 1000;
}

.stamp-animation {
    animation: stampPop 0.5s ease;
}

@keyframes stampPop {
    0% { transform: scale(0.3) rotate(-15deg); }
    50% { transform: scale(1.2) rotate(10deg); }
    100% { transform: scale(1) rotate(0deg); }
}

@keyframes swing {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
    100% { transform: rotate(0deg); }
}

.swinging {
    animation: swing 2s infinite ease-in-out;
}

.swinging-reverse {
    animation: swing 2s infinite ease-in-out reverse;
}

#email {
    display: none;
}

.calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.calendar-nav button {
    background-color: #ff8da1;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    font-weight: bold;
}

.calendar-nav button:hover {
    background-color: #ff7a91;
    transform: scale(1.05);
}

.current-month {
    font-size: 18px;
    color: #ff8da1;
    font-weight: bold;
    padding: 5px 0;
}

/* iframe {
    overflow: hidden;
    overflow-x: hidden;
    overflow-y: hidden;
    border: none;
    
}

 */


/* iframe内のbody要素のスタイル */
iframe body {
    overflow: hidden;
}

/* 右上ボタン用のスタイル */
.top-buttons {
    position: absolute;  /* fixedからabsoluteに変更 */
    top: 10px;
    right: 10px;
    display: flex;
    gap: 3px;
    z-index: 1001;
}

.icon-button {
    width: 32px;
    height: 32px;
    background: #ff8da1;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: white;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.icon-button:hover {
    background: #ff7a91;
    transform: scale(1.1);
}

/* オーバーレイのスタイル */
.help-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 1001;
}

/* ダイアログのスタイル調整 */
.help-dialog {
    position: fixed;  /* fixedからrelativeに変更 */
    top: 100px;
    left: 2%;
    right: 2%;

    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #ff8da1;
    border-radius: 10px;
    padding: 0 10px;
    z-index: 1002;
    /* text-align: center; */
    margin: 0 auto;
    cursor: default;  /* pointerから変更 */
}

.help-content {
    font-size: small;
    color: #333;
    line-height: 1.6;  /* 行間を少し広げる */
}

.help-content h3 {
    margin-bottom: 3px;
    font-weight: bold;
    border-bottom: 2px solid #ff8da1;
    /* padding-bottom: 5px;
    margin-top: 15px; */
}



@keyframes kirakiraAnimation {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(180deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(360deg);
        opacity: 0;
    }
}

/* character.pngがグルグル回転しながら、少しずつ小さくなりながら消えていくアニメーション */
@keyframes spinShrinkFade {
  0% {
    opacity: 1;
    transform: rotate(0deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: rotate(720deg) scale(0);
  }
}

/* character.png がはじけるように消えるアニメーション */
@keyframes burstOut {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.4);
  }
  100% {
    opacity: 0;
    transform: scale(1.4);
  }
}

.fly-away {
  animation: burstOut 0.8s ease-out forwards;
}




