
基本

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

body{

    background:#c1c3ff;

    font-family:'DotGothic16',sans-serif;

    color:#6663d4;

    padding:20px;

}

.container{

    max-width:1100px;

    margin:auto;

    background:#c1c3ff;

    border:4px solid #6663d4;

    padding:25px;

    box-shadow:8px 8px #6663d4;

}

タイトル 

header{

    text-align:center;

    margin-bottom:30px;

}

header h1{

    font-size:36px;

    letter-spacing:3px;

}

header p{

    margin-top:10px;

}



  カレンダー 


.calendar{

    display:grid;

grid-template-columns: repeat(7, minmax(0, 1fr));

    gap:12px;

}

.day{

    background:#ffffff;

    border:3px solid #6663d4;

    min-height:110px;

    display:flex;

    flex-direction:column;

    align-items:center;

    justify-content:center;

    cursor:pointer;

    transition:.15s;

}

.day:hover{

    transform:translate(-3px,-3px);

    box-shadow:5px 5px #6663d4;

}

.day.selected{

    background:#ffbbe4;

}

.day.today{

    border:3px dashed #6663d4;

}

.day-number{

    margin-bottom:8px;

}

.day img{

    width:58px;

    image-rendering:pixelated;

}



   感情選ぶところ


.emotion-window{

    margin-top:40px;

    background:#ffffff;

    border:4px solid #6663d4;

    padding:20px;

    box-shadow:8px 8px #6663d4;

}

.emotion-window h2{

    text-align:center;

    margin-bottom:20px;

}

.emotion-list{

    display:grid;

    grid-template-columns:repeat(4,1fr);

    gap:20px;

}

.emotion-list img{

    width:70px;

    margin:auto;

    cursor:pointer;

    image-rendering:pixelated;

    transition:.15s;

}

.emotion-list img:hover{

    transform:scale(1.15);

}



   メモ

.memo-window{

    margin-top:35px;

    background:#c1c3ff;

    border:4px solid #6663d4;

    padding:20px;

    box-shadow:8px 8px #6663d4;

}

.memo-window h2{

    text-align:center;

    margin-bottom:15px;

}

textarea{

    width:100%;

    height:120px;

    resize:none;

    padding:15px;

    font-family:'DotGothic16',sans-serif;

    border:3px solid black;

    font-size:14px;

}

.memo-footer{

    display:flex;

    justify-content:space-between;

    align-items:center;

    margin-top:15px;

}

#saveButton{

    width:150px;

    height:45px;

    background:white;

    border:3px solid black;

    cursor:pointer;

    font-family:'DotGothic16',sans-serif;

    transition:.15s;

}

#saveButton:hover{

    transform:translate(-2px,-2px);

    box-shadow:4px 4px black;

}

#saveButton:active{

    transform:translate(2px,2px);

    box-shadow:none;

}


/* --------------------
   SAVE COMPLETE
-------------------- */

#savePopup{

    position:fixed;

    top:20px;

    right:20px;

    background:black;

    color:white;

    padding:15px 25px;

    border:3px solid white;

    display:none;

    z-index:1000;

}


/* --------------------
   HISTORY
-------------------- */

.history-window{

    margin-top:45px;

    background:#fbfbfb;

    border:4px solid black;

    padding:20px;

    box-shadow:8px 8px black;

}

.history-window h2{

    text-align:center;

    margin-bottom:20px;

}


/* 外側 */

.history-wrapper{

    overflow:hidden;

}


/* 流れる部分 */

#historyTrack{

    display:flex;

    gap:20px;

    width:max-content;

    animation:historyScroll 35s linear infinite;

}

/* PCではホバーで停止 */

#historyTrack:hover{

    animation-play-state:paused;

}


/* カード */

.history-card{

    width:170px;

    min-height:190px;

    background:white;

    border:3px solid black;

    box-shadow:5px 5px black;

    padding:15px;

    flex-shrink:0;

    text-align:center;

}

.history-card img{

    width:70px;

    image-rendering:pixelated;

    margin-bottom:10px;

}

.history-date{

    margin-bottom:10px;

}

.history-comment{

    font-size:13px;

    word-break:break-word;

}


/* --------------------
   アニメーション
-------------------- */

@keyframes historyScroll{

    from{

        transform:translateX(0);

    }

    to{

        transform:translateX(calc(-190px * 8));

    }

}

@keyframes pop{

    0%{

        transform:scale(.6);

    }

    50%{

        transform:scale(1.2);

    }

    100%{

        transform:scale(1);

    }

}

.pop{

    animation:pop .25s;

}


/* --------------------
   フッター
-------------------- */

footer{

    margin-top:50px;

    text-align:center;

}


/* --------------------
   スマホ
-------------------- */

@media(max-width:768px){

.calendar{

gap: 4px;

}

.day{

min-height:90px;

}

.day img{

width:45px;

}

.emotion-list{

grid-template-columns:repeat(4,1fr);

gap:12px;

}

.emotion-list img{

width:55px;

}

.memo-footer{

flex-direction:column;

gap:15px;

}

#saveButton{

width:100%;

}

.history-wrapper{

overflow-x:auto;

overflow-y:hidden;

padding-bottom:10px;

}

/* スマホでは自動スクロールを止めて
   指で横スクロールできるようにする */

#historyTrack{

animation:none;

padding-right:20px;

}

.history-card{

width:150px;

min-height:170px;

}

}

#historyTrack{

    display:flex;

    gap:20px;

    width:max-content;

    animation:historyScroll 60s linear infinite;

}
.delete-btn{

    margin-top:10px;

    width:28px;

    height:28px;

    border:2px solid black;

    background:white;

    cursor:pointer;

    font-family:'DotGothic16',sans-serif;

}

.delete-btn:hover{

    background:#ffb5b5;

}

.day {
    min-width: 0;
}

.day img {
    max-width: 100%;
    height: auto;
}

.history-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 6px 12px;
}

#historyTrack {
    flex-wrap: nowrap;
    animation: none;
}

.history-card {
    height: 190px;
    min-height: 0;
    overflow-y: auto;
    overflow-wrap: anywhere;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 8px;
        box-shadow: 4px 4px #6663d4;
    }

    .day {
        min-height: 64px;
        border-width: 2px;
    }

    .day.today {
        border-width: 2px;
    }

    .day img {
        width: min(32px, 100%);
    }

    .emotion-list {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .emotion-list img {
        max-width: 100%;
        height: auto;
    }
}

.calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekday {
    text-align: center;
    font-size: 14px;
    padding-block: 6px;
}

#calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekday {
    text-align: center;
    padding-block: 6px;
}

.day-icon:not([src]) {
    display: none;
}

@media (max-width: 768px) {
    #calendar {
        gap: 4px;
    }
}
.status-bar, .month-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px 16px;
    margin-block: 16px;
}

.status-bar {
    background: white;
    border: 3px solid #6663d4;
    padding: 8px;
}

.calendar-section {
    text-align: center;
}

.month-controls button, #currentMonth {
    background: white;
    border: 2px solid #6663d4;
    color: inherit;
    font: inherit;
    padding: 6px 12px;
    cursor: pointer;
}

#currentMonth {
    margin-bottom: 10px;
}

.day {
    color: inherit;
    font: inherit;
    padding: 2px;
}

.calendar-weekday:first-child { color: #9c2457; }
.calendar-weekday:nth-child(7) { color: #304da7; }

.history-space { flex: 0 0 20px; }

/* ページメニューとタイムライン */
.site-nav { display: flex; justify-content: flex-end; }
.site-nav details { position: relative; }
.site-nav summary {
    list-style: none;
    cursor: pointer;
    background: #fff;
    border: 3px solid #6663d4;
    padding: 4px 12px;
    font-size: 24px;
}
.site-nav summary::-webkit-details-marker { display: none; }
.site-links {
    position: absolute;
    right: 0;
    z-index: 20;
    width: max-content;
    background: white;
    border: 3px solid #6663d4;
    box-shadow: 4px 4px #6663d4;
}
.site-links a { display: block; padding: 8px 14px; color: #473da0; }
.site-links a[aria-current="page"] { background: #ffbbe4; }

#timelineMonth { max-width: 100%; font: inherit; color: #473da0; }
#monthSummary { margin-block: 12px; color: #473da0; }
#emotionSummary { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
#emotionSummary li { background: #ffeff8; padding: 4px 8px; color: #473da0; }
#timelineRecords { list-style: none; margin: 20px 0 0 8px; border-left: 3px solid #6663d4; }
.timeline-record {
    position: relative;
    margin: 0 0 12px 16px;
    padding: 12px;
    border: 2px solid #6663d4;
    background: #fff;
    color: #473da0;
    overflow-wrap: anywhere;
}
.timeline-record::before {
    content: "";
    position: absolute;
    top: 16px;
    left: -24px;
    width: 10px;
    height: 10px;
    background: #ff8fce;
    border: 2px solid #6663d4;
}
.timeline-record img { width: 34px; height: 34px; object-fit: contain; image-rendering: pixelated; vertical-align: middle; }
.timeline-record p { margin-top: 6px; white-space: pre-wrap; }

.timeline-page .container { background: #ecebff; }
.timeline-header { background: #fff; border: 3px solid #6663d4; margin-top: 16px; box-shadow: 5px 5px #aba5ef; }
.timeline-header p { color: #514ab0; }
.timeline-controls { background: #dad6fb; padding: 16px 8px; border: 2px solid #aaa4e8; }
.timeline-page #monthSummary { font-size: 18px; margin: 24px 0 12px; }
.timeline-page #emotionSummary li { border: 1px solid #b0a7e7; box-shadow: 2px 2px #d0caee; padding: 6px 12px; }
.timeline-page #timelineRecords { margin-top: 30px; }
.timeline-page .timeline-record { padding: 18px; margin-bottom: 20px; box-shadow: 4px 4px #cec8ee; }
.timeline-record time { display: inline-block; padding: 3px 8px; background: #efecff; }
.timeline-record p { padding-top: 10px; border-top: 1px dashed #ccc4e9; line-height: 1.8; }
