:root {
    font-family: system-ui, -apple-system, sans-serif;
    color: #231F20;
    background: #fafafa;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Noto Sans JP", sans-serif;
    font-style: normal;
    font-feature-settings: "palt";
    font-size: clamp(1.125rem, -0.075rem + 1.2vw, 2rem);
}

.show_768 {
    display: none;
}

h2 {
    font-family: "Noto Serif JP", serif;
    font-style: normal;
    font-size: clamp(3.75rem, -0.25rem + 4vw, 5rem);
    line-height: 1;
    margin: 0 0 30px;
}

h3 {
    font-size: 80px;
    line-height: 0.8;
    margin: 0;
}

.oswald {
    font-family: "Oswald", sans-serif;
    font-optical-sizing: auto;
    font-weight: 700;
    font-style: normal;
    color: #B72937;
}

.site-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: 20px 0 40px;
    background-image: url("../img/common-bg.jpg");
    background-size: cover;
    background-position: bottom center;
    color: #fff;
    font-family: "Noto Serif JP", serif;
    font-style: normal;
    font-weight: 700;
    font-size: clamp(3.75rem, 1.9643rem + 1.7857vw, 6.25rem);
    letter-spacing: 0.06em;
    line-height: 1;
}

.site-header h1::after {
    content: "";
    background-image: url(../img/agu-chara.png);
    background-size: contain;
    position: absolute;
    bottom: -140%;
    right: -25%;
    width: 36%;
    max-width: 245px;
    aspect-ratio: 541 / 344;
    mix-blend-mode: multiply;
}

.site-header p {
    font-size: 20px;
    line-height: 1;
    margin: 20px 0 0;
}

@media screen and (min-width: 2100px) {
    .site-header h1::after {
        max-width: 280px;
        right: -20%;
    }

    .site-header {
        padding: 40px 0 50px;
    }

    h3 {
        font-size: 100px;
    }

    body {
        font-size: 40px;
    }

    .site-header p {
        font-size: 36px;
        margin: 30px 0 0;
    }
}

@media screen and (max-width: 1600px) {
    .site-header h1::after {
        max-width: 200px;
        right: -20%;
    }
}

@media screen and (max-width: 1500px) {
    .site-header h1::after {
        max-width: 150px;
        right: -8%;
    }
}

@media screen and (max-width: 1260px) {
    .site-header h1::after {
        content: none;
    }
}

@media screen and (max-width: 768px) {
    .show_768 {
        display: block;
    }
}

footer {
    text-align: center;
    color: #fff;
    padding: 50px 0;
    background-image: url("../img/common-bg.jpg");
    background-size: cover;
    background-position: bottom center;
    font-size: 13px;
}

footer p {
    position: relative;
    margin: 0 auto;
    width: fit-content;
}

footer p:after {
    content: "";
    background-image: url(../img/agu-chara.png);
    background-size: cover;
    position: absolute;
    bottom: -50px;
    left: -60%;
    width: 50%;
    max-width: 200px;
    aspect-ratio: 541 / 344;
    background-repeat: no-repeat;
    background-position-y: top;
    mix-blend-mode: multiply;
}

@media screen and (max-width: 1000px) {
    .site-header h1::after {
        bottom: -49%;
        right: -63%;
        max-width: 250px;
    }

    .site-header {
        padding: 20px 0px;
    }

    .site-header p {
        font-size: 14px;
        line-height: 1.4;
        margin: 10px 0 0;
    }
}

@media screen and (max-width: 768px) {
    .site-header h1::after {
        content: none;
    }

    .site-header h1 {
        text-shadow: rgb(5, 5, 5) 1px 2px;
    }

    footer p:after {
        content: none;
    }

    .site-header p {
        font-size: 13px;
        margin: 5px 0 0;
    }

    footer {
        padding: 20px 0;
    }
}

.link-btn {
    display: none;
}

@media screen and (max-width: 2100px) {
    .link-btn {
        opacity: 0;
        display: block;
        visibility: hidden;
        transition: opacity 0.3s ease;
        position: fixed;
        right: 20px;
        bottom: 20px;
        z-index: 99;
        width: 100px;
    }

    .link-btn img {
        width: 100px;
        aspect-ratio: 1/1;
    }

    .link-btn.is-show {
        opacity: 1;
        visibility: visible;
    }
}

.site-header a {
    color: #fff;
    text-decoration: none;
}

.site-header img {
    max-width: 300px;
    width: 15%;
    min-width: 150px;
}

#form-page {
    padding-bottom: clamp(4rem, -0.2616rem + 8.1395vw, 6.25rem);
    min-height: 81.5vh;
    background-color: #E5E5E5;
}

#admin-page {
    padding-bottom: clamp(4rem, -0.2616rem + 8.1395vw, 6.25rem);
    background-color: #E5E5E5;
    font-size: 16px;
}

.container {
    margin: 0 auto;
}

#form-page .container {
    max-width: 960px;
}

.container-contents {
    padding: clamp(4rem, -0.2616rem + 8.1395vw, 6.25rem) clamp(1.25rem, -0.5814rem + 6.9767vw, 5rem) 0;
}

.max-contents {
    margin-top: 100px;
    padding: 0 100px;
    background-color: #E5E5E5;
    position: relative;
}

.max-contents::before {
    content: "";
    top: 0;
    right: 0;
    position: absolute;
    z-index: 0;
    background-repeat: no-repeat;
    background-size: contain;
    background-image: url(../img/bg-dec.png);
    width: clamp(37.5rem, 26.2218rem + 15.0376vw, 62.5rem);
    aspect-ratio: 1 / 1;
    opacity: 0.8;
    transform: scale(-1, 1);
}

.max-contents::after {
    content: "";
    bottom: 0;
    right: 0;
    position: absolute;
    z-index: 0;
    background-repeat: no-repeat;
    background-size: contain;
    background-image: url(../img/bg-dec.png);
    width: clamp(37.5rem, 26.2218rem + 15.0376vw, 62.5rem);
    aspect-ratio: 1 / 1;
    transform: scale(-1);
    opacity: 0.7;
}

.card {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
}

.card:not(.table-wrap) {
    max-width: 640px;
    margin: 0 auto;
}

.intro {
    margin-bottom: 30px;
}

.site-header h1 {
    text-shadow: rgb(5, 5, 5) 2px 3px;
}

h1 {
    font-size: 60px;
    margin: 8px 0;
    position: relative;
    text-align: center;
}

@media screen and (min-width: 2100px) {
    h1 {
        font-size: 85px;
    }
}

@media screen and (max-width: 1200px) {
    h1 {
        font-size: clamp(1.5rem, 0.9rem + 2.56vw, 2.5rem);
        line-height: 1.2;
    }
}

label {
    display: block;
    margin: 0 0 20px;
    font-weight: 600;
    letter-spacing: 0.05em;
}

@media screen and (max-width: 560px) {
    label {
        font-size: 16px;
    }
}

input,
textarea {
    display: block;
    width: 100%;
    margin-top: 5px;
    padding: 12px;
    border: 1px solid #ccd7d9;
    border-radius: 5px;
    font: inherit;
    font-weight: normal;
}

button {
    border: 0;
    border-radius: 5px;
    padding: 12px 18px;
    background: #B72937;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    width: 250px;
    margin: auto;
    display: block;
    font-size: 18px;
    letter-spacing: 0.07em;
}

.admin-link {
    display: inline-block;
    padding: 12px 18px;
    margin-bottom: 12px;
    color: #463228;
    background: #fff;
    border: 1px solid #463228;
    font-weight: 700;
    border-radius: 5px;
    text-decoration: none;
    cursor: pointer;
}

.admin-saved-text {
    color: #1b9437;
}

.admin-search {
    display: grid;
    grid-template-columns: minmax(260px, 1.4fr) repeat(2, minmax(160px, 1fr)) minmax(130px, 0.7fr);
    gap: 16px;
    align-items: end;
    margin: 20px 0;
}

.admin-search label,
.admin-search legend {
    margin: 0;
    font-weight: 600;
    letter-spacing: 0;
}

.admin-year-range {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.admin-year-range>div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
}

.admin-search input,
.admin-search select {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    height: 48px;
    margin-top: 5px;
    padding: 10px;
    border: 1px solid #ccd7d9;
    border-radius: 5px;
    background: #fff;
    font: inherit;
    font-weight: normal;
}

.admin-search-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
}

.admin-search-actions button {
    width: auto;
    min-width: 100px;
    margin: 0;
    letter-spacing: 0;
}

.admin-search-actions a {
    color: #463228;
}

.admin-result-count {
    margin: 20px 0 12px;
}

.admin-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
}

.admin-pagination a,
.admin-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 44px;
    min-height: 44px;
    padding: 8px;
    border: 1px solid #ccd7d9;
    border-radius: 5px;
    background: #fff;
    color: #463228;
    text-decoration: none;
}

.admin-pagination .current,
.admin-pagination a:hover {
    border-color: #B72937;
    background: #B72937;
    color: #fff;
}

.admin-pagination .pagination-gap {
    min-width: 20px;
    border: 0;
    background: transparent;
}

@media screen and (max-width: 1100px) {
    .admin-search {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media screen and (max-width: 560px) {
    .admin-search {
        grid-template-columns: minmax(0, 1fr);
    }
}

.alert {
    padding: 14px;
    margin-bottom: 20px;
    background: #fff0ed;
    color: #a33b25;
    border-radius: 8px;
}

.timeline {
    border-left: 3px solid #cf6b3b;
    margin-left: 20px;
}

.timeline-month {
    position: relative;
    padding: 0 0 34px 30px;
}

.timeline-month:before {
    content: "";
    position: absolute;
    left: -10px;
    top: 5px;
    width: 15px;
    height: 15px;
    background: #cf6b3b;
    border-radius: 50%;
}

.timeline-month h2 {
    margin-top: 0;
}

.timeline-group {
    display: flex;
    gap: 30px;
    margin-bottom: 100px;
}

.max-contents span {
    font-size: 0.7em;
}

.posts {
    display: flex;
    gap: 50px 0px;
    flex-wrap: wrap;
}

.timeline-group .posts {
    width: calc(100% - 290px);
    gap: 15px 0px;
}

.max-contents .fix-year {
    opacity: 0;
    position: absolute;
}

@media screen and (min-width: 2100px) {
    .timeline-group .posts {
        width: calc(100% - 400px);
        gap: 15px 0px;
    }

    .max-contents .fix-year {
        z-index: 99;
        padding: 160px 20px 60px;
        width: fit-content;
        text-align: center;
        background-color: #E5E5E5;
    }

    .max-contents .fix-year {
        opacity: 1;
    }

    .max-contents .fix-year h3 {
        display: none;
        transition: opacity 0.5s ease, transform 0.5s ease;
        opacity: 0;
        position: relative;
    }

    .max-contents .fix-year h3:after {
        content: "";
        height: 30px;
        width: 100%;
        bottom: -90px;
        left: 0;
        position: absolute;
        background: linear-gradient(#E5E5E5, #ffffff00);
    }

    .max-contents .fix-year h3.show {
        display: block;
        opacity: 1;
    }
}

.post {
    background: #E5E5E5;
    padding: clamp(1.875rem, 1.593rem + 0.3759vw, 2.5rem);
    border-radius: clamp(0.9375rem, 0.7582rem + 0.2049vw, 1.25rem);
    position: relative;
}

.year {
    font-size: clamp(3.125rem, 2.2321rem + 0.8929vw, 4.375rem);
    line-height: 1;
}

#timeline .timeline-year {
    position: relative;
    z-index: 99;
    height: fit-content;
    width: fit-content;
    text-align: center;
    padding: 50px 15px;
}

#timeline .timeline-year:after {
    position: absolute;
    background-color: #E5E5E5;
    z-index: -1;
    width: 100%;
    height: 100%;
    content: "";
    left: 0;
    top: 0;
    bottom: 0;
    margin: auto;
}

.container-contents:has(#latest-post) {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.container-contents:has(#latest-post) h2 {
    width: fit-content;
    margin-bottom: 0;
    font-size: clamp(3.125rem, 1.125rem + 2vw, 3.75rem);
}

#latest-post {
    width: calc(100% - 360px);
}

#latest-post .post {
    display: flex;
    gap: 0 20px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.latest-comment {
    width: 85%;
}

#timeline {
    position: relative;
    z-index: 2;
    padding: 100px 0;
}

#timeline::after {
    position: absolute;
    height: calc(100% - 100px);
    width: 5px;
    content: "";
    background-color: #B72937;
    left: 120px;
    top: 100px;
}


#timeline .post {
    margin-left: 50px;
    background-color: #fff;
}

#timeline .post:after,
#latest-post .post:after {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    border-style: solid;
    border-width: 10px 20px 10px 0;
    border-color: transparent #fff transparent transparent;
    translate: -100% -50%;
}

#latest-post .post:after {
    border-color: transparent #E5E5E5 transparent transparent;
}

#pickup-posts {
    margin-left: 5%;
    width: 95%;
    justify-content: space-between;
    animation: shake-base 12s infinite;
    opacity: 1;
    transition: opacity 0.5s ease;
}

#pickup-posts.is-fade {
    opacity: 0.25;
}

#pickup-posts .post {
    width: 48%;
}

@media screen and (min-width: 2100px) {
    .container-contents:has(#latest-post) {
        height: 350px;
    }

    .container-contents:has(#pickup-posts) {
        height: 1000px;
    }

    .scroll-area {
        height: 150vh;
        overflow: hidden;
    }

    .scroll-content {
        opacity: 1;
        will-change: transform, opacity;
        transition: opacity 0.5s ease;
    }

    .scroll-content.is-fade {
        opacity: 0;
    }

    #timeline::after {
        left: 150px;
        width: 7px;
    }
}

@keyframes shake-base {
    0% {
        transform: translate(0.0em, 0.0em) rotate(0deg);
    }

    50% {
        transform: translate(-0.5em, 0.8em) rotate(0deg);
    }

    100% {
        transform: translate(0.0em, 0.0em) rotate(0deg);
    }
}

@keyframes shake {
    0% {
        transform: translate(0.0em, 0.0em) rotate(-2deg);
    }

    50% {
        transform: translate(-0.5em, 0.8em) rotate(-2deg);
    }

    100% {
        transform: translate(0.0em, 0.0em) rotate(-2deg);
    }
}

@keyframes shake2 {
    0% {
        transform: translate(0.0em, 0.0em) rotate(-1deg);
    }

    50% {
        transform: translate(0.3em, -0.3em) rotate(-1deg);
    }

    100% {
        transform: translate(0.0em, 0.0em) rotate(-1deg);
    }
}

@keyframes shake3 {
    0% {
        transform: translate(-0.3em, 0.5em) rotate(-1deg);
    }

    50% {
        transform: translate(0.0em, 0.0em) rotate(-1deg);
    }

    100% {
        transform: translate(-0.3em, 0.5em) rotate(-1deg);
    }
}

@keyframes shake4 {
    0% {
        transform: translate(-0.0em, 0.0em) rotate(1.5deg);
    }

    50% {
        transform: translate(-0.3em, 0.5em) rotate(1.5deg);
    }

    100% {
        transform: translate(-0.0em, 0.0em) rotate(1.5deg);
    }
}

#pickup-posts .post:nth-child(1) {
    background-color: #DDE7DA;
}

#pickup-posts .post:nth-child(1):after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: #93E877;
    left: -1%;
    top: 0px;
    z-index: -1;
    border-radius: clamp(0.9375rem, 0.7582rem + 0.2049vw, 1.25rem);
    transform: rotate(-3deg);
    animation: shake 12s infinite;
}

#pickup-posts .post:nth-child(2) {
    background-color: #E7DAE7;
    top: -30px;
}

#pickup-posts .post:nth-child(2):after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: #FDA0FB;
    right: -1.5%;
    top: -0.7%;
    z-index: -1;
    border-radius: clamp(0.9375rem, 0.7582rem + 0.2049vw, 1.25rem);
    transform: rotate(1deg);
    animation: shake2 5s infinite;
}

#pickup-posts .post:nth-child(3) {
    background-color: #E7DFDA;
    left: -30px;
}

#pickup-posts .post:nth-child(3):after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: #FFA372;
    left: -2%;
    bottom: -10px;
    z-index: -1;
    border-radius: clamp(0.9375rem, 0.7582rem + 0.2049vw, 1.25rem);
    transform: rotate(2deg);
    animation: shake3 10s infinite;
}

#pickup-posts .post:nth-child(4) {
    background-color: #DAE3E7;
    top: -30px;
    left: -30px;
}

#pickup-posts .post:nth-child(4):after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: #8EDCFF;
    right: -2%;
    bottom: -5px;
    z-index: -1;
    border-radius: clamp(0.9375rem, 0.7582rem + 0.2049vw, 1.25rem);
    transform: rotate(-2deg);
    animation: shake4 8.5s infinite;
}

.post p {
    margin: 0 0 10px;
    white-space: pre-wrap;
}

.post p.nickname {
    margin-bottom: 0;
    font-size: 0.9em;
    font-weight: bold;
    opacity: 0.7;
}

.post small {
    color: #697980;
}

.empty {
    text-align: center;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid #e5ebeb;
    vertical-align: middle;
    min-width: 5.5rem;
}

.deleted {
    opacity: .5
}

.danger {
    background: #9f3e35;
    font-size: .8rem;
    min-width: 4.8rem;
}