.auto-style15 {
    color: #FFFFFF;
    background-color: #003300;
}

.snsarea {
    width: 100%;
    background-color: #FFE1FF;
    text-align: center;
    font-weight: bold;
}

/* first-time-setとsecond-time-setのスタイル */
.first-time-set {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 10px;
}

.second-time-set {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    width: 100%;
}

#photo {
    width: 850px;
    height: 250px;
    max-width: 100%;
    margin: 0 auto;
    text-align: center;
    overflow: hidden;
    position: relative;
}

#photo img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* 方向幕式発車標スタイル（昭和時代国鉄風） */
.departure-board {
    display: flex;
    flex-direction: column;
    background-color: #E8E8E8;
    border: none; /* 枠線を削除 */
    margin: 15px 0 25px 0;
    padding: 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    color: #A12AA7;
    font-family: "UD丸ゴシック", "M PLUS Rounded 1c", "Rounded Mplus 1c", "Hiragino Maru Gothic ProN", "Meiryo", "メイリオ", sans-serif;
}

/* ヘッダー部分 */
.board-header {
    background-color: #A12AA7; /* 背景 */
    padding: 10px;
    display: flex;
    justify-content: center;
    border-bottom: 3px solid #666;
}

.train-type {
    font-size: 20px;
    color: #FFFFFF; /* 白文字 */
    font-weight: bold;
    background-color: transparent; /* 背景なし */
    padding: 5px 15px;
    display: inline-block;
    border: none;
    font-family: "UD丸ゴシック", "M PLUS Rounded 1c", "Rounded Mplus 1c", "Hiragino Maru Gothic ProN", "Meiryo", "メイリオ", sans-serif;
}

/* 時刻表示部分 */
.time-section {
    flex: 1;
    background-color: #E8E8E8;
    padding: 15px;
}

.date-time-row {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

/* 日付と時刻の表示エリアを調整 */
.date-display, .time-display {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin: 10px;
}

.date-display, .time-display {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin: 10px;
}

.date-label, .time-label {
    display: none; /* 非表示にする（HTML互換性のため） */
}

.date-label-inline, .time-label-inline {
    width: auto;
    font-size: 24px;
    background-color: transparent; /* 背景は周囲と同じ */
    color: #FF0000; /* 赤文字 */
    padding: 3px 10px;
    border: none;
    text-align: center;
    margin-right: 10px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold; /* 太字 */
    font-family: "UD丸ゴシック", "M PLUS Rounded 1c", "Rounded Mplus 1c", "Hiragino Maru Gothic ProN", "Meiryo", "メイリオ", sans-serif;
    white-space: nowrap; /* 改行を防止 */
}

.date-value, .time-value {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 数字表示部分（ロール式） */
.digit-container {
    background-color: #FFFFFF;
    border: 1px solid #000;
    width: 40px;
    height: 60px;
    margin: 0 2px;
    position: relative;
    overflow: hidden;
    /* くぼんで見えるように内側に影をつける */
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.date-value .digit-container:first-child {
    width: 80px; /* 年の表示は幅を広く */
}

/* 時刻表示部分のスタイル調整 */
.time-value {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    flex-wrap: nowrap;
}

/* 時刻の数字グループ（時間・分）をまとめる */
.time-group {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 70px; /* 固定幅を設定（digit-container 2つ分+マージン） */
    box-sizing: border-box; /* ボーダーとパディングを幅に含める */
    margin: 0;
    padding: 0 2px;
}

/* すべてのdigit-containerの幅を統一 */
.time-value .digit-container {
    width: 30px;
    height: 50px;
    margin: 5 2px;
    flex-shrink: 0; /* 縮小を防止 */
}

/* 時刻表示部分のセパレーターの調整 */
.time-value .separator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 50px;
    text-align: center;
    flex-shrink: 0; /* 縮小を防止 */
    margin: 0;
    font-weight: bold;
}

.digit {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    color: #000000;
    font-family: "UD丸ゴシック", "M PLUS Rounded 1c", "Rounded Mplus 1c", "Hiragino Maru Gothic ProN", "Meiryo", "メイリオ", sans-serif !important;
    /* すべての数字を同時にゆっくりとアニメーション */
    animation: none; /* 初期状態ではアニメーションなし */
}


/* 全ての数字を同時にアニメーションさせる */
@keyframes rollAllDigits {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    50% {
        transform: translateY(-50%);
        opacity: 0.5;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.separator {
    margin: 0 2px;
    font-size: 20px;
    color: #000000;
    font-weight: bold;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
}

.day-of-week-container {
    width: 80px !important; /* 曜日表示は幅を広く */
    margin-left: 5px;
}

.day-of-week {
    font-size: 18px;
    color: #FF3333;
    font-family: "UD丸ゴシック", "M PLUS Rounded 1c", "Rounded Mplus 1c", "Hiragino Maru Gothic ProN", "Meiryo", "メイリオ", sans-serif;
}

/* 日曜日（「日」）を赤色で表示 */
.digit.Week {
    color: #FF0000;
    font-weight: bold;
}

/* 追加情報部分 */
.info-section {
    flex: 0 0 100%;
    background-color: #003399;
    padding: 5px 0;
    border-top: 2px solid #666;
    text-align: center;
}

.info-section p {
    margin: 0 0;
    font-size: 14px;
    color: #FFFFFF;
}
.info-section a {
    display: inline-block;
    padding: 8px 16px;
    background-color: #FFFF99;
    color: #003399;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    margin: 5px 0;
    font-size: 15px;
    border: 1px solid #003399;
}

.info-section a:hover {
    background-color: #FFFFCC;
    color: #002277;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}



/* 次回運転会バナー用スタイル */
.next-untenkai-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    background: linear-gradient(135deg, #003300 0%, #004400 100%);
    border: 3px solid #FF33FF;
    border-radius: 8px;
    margin: 15px 0 25px 0;
    padding: 15px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
    color: #FFFFFF;
}

.next-untenkai-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
    border-radius: 6px;
}

.untenkai-icon {
    flex: 0 0 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 10px;
}

.untenkai-date {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 15px;
    border-left: 1px dashed rgba(255, 255, 255, 0.3);
    border-right: 1px dashed rgba(255, 255, 255, 0.3);
}

.date-label {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #FF99FF;
}

.date-value {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
    font-family: "UD丸ゴシック", "M PLUS Rounded 1c", "Rounded Mplus 1c", "Hiragino Maru Gothic ProN", "Meiryo", "メイリオ", sans-serif;
}

.time-value {
    font-size: 22px;
    font-weight: bold;
    font-family: "UD丸ゴシック", "M PLUS Rounded 1c", "Rounded Mplus 1c", "Hiragino Maru Gothic ProN", "Meiryo", "メイリオ", sans-serif;
}


.untenkai-info {
    flex: 0 0 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 0px;
}

.untenkai-info p {
    margin: 5px 0;
    font-size: 14px;
}

.untenkai-info a {
    color: #FF99FF;
    text-decoration: none;
    font-weight: bold;
}

.untenkai-info a:hover {
    text-decoration: underline;
    color: #FFCCFF;
}

/* レスポンシブ対応 */
@media only screen and (max-width: 768px) {
    .next-untenkai-banner {
        flex-direction: column;
        padding: 10px;
    }
    
    .untenkai-icon, .untenkai-date, .untenkai-info {
        width: 100%;
        border: none;
        padding: 5px 0;
        text-align: center;
    }
    
    .untenkai-date {
        border-top: 1px dashed rgba(255, 255, 255, 0.3);
        border-bottom: 1px dashed rgba(255, 255, 255, 0.3);
        padding: 10px 0;
        margin: 10px 0;
    }
    
    /* 発車標のレスポンシブ対応 */
    .departure-board {
        padding: 0;
    }
    
    .date-time-row {
        flex-direction: column;
        align-items: center;
    }
    
    .date-display, .time-display {
        width: 100%;
        margin: 10px 0;
    }
    
    .date-value, .time-value {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .digit-container {
        margin: 2px;
    }
    
    /* ボタンのレスポンシブ対応 */
    .info-section a {
        padding: 10px 16px;
        font-size: 16px;
        width: 85%;
        max-width: 300px;
    }
}

/* お知らせカード用スタイル */
.topics-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.topic-card {
    background-color: #003300;
    color: #FFFFFF;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    border: 3px solid #004400;
}

.topic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

/* 黒板の枠線を表現 */
.topic-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
    border-radius: 6px;
}

.topic-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.3);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topic-category {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    color: white;
    font-weight: bold;
    font-size: 14px;
    text-align: center;
    min-width: 80px;
    /* チョークで書いたような雰囲気を出す */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.category-caution {
    background-color: #FF3333;
}

.category-untenkai {
    background-color: #FF33FF;
}

.category-others {
    background-color: #3333FF;
}

.topic-date {
    font-size: 14px;
    color: #FFFFFF;
    background-color: rgba(0, 0, 0, 0.3);
    padding: 3px 8px;
    border-radius: 4px;
}

.topic-new-badge {
    display: inline-block;
    margin-left: 10px;
    padding: 3px 8px;
    background-color: #FF33FF;
    color: white;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    animation: pulse 1.5s infinite;
    box-shadow: 0 0 5px rgba(255, 51, 255, 0.7);
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.topic-title-inline {
    font-size: 18px;
    font-weight: bold;
    color: #FFFFFF;
    /* チョークで書いたような雰囲気を出す */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    font-family: "Times New Roman", "YuMincho", "Hiragino Mincho ProN", "Yu Mincho", "MS PMincho", serif;
}

.topic-content {
    padding: 0px;
    color: #FFFFFF;
    /* チョークで書いたような雰囲気を出す */
    text-shadow: 0.5px 0.5px 1px rgba(0, 0, 0, 0.3);
    /* 折りたたみ表示 */
    max-height: 0px;
    overflow: hidden;
    transition: max-height 0.5s ease;
    position: relative;
}

/* 折りたたみ時の下部グラデーション */
.topic-content::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background: linear-gradient(to bottom, rgba(0, 51, 0, 0), rgba(0, 51, 0, 1));
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* 展開時のスタイル */
.topic-card.expanded .topic-content {
    max-height: 500px; /* 十分な高さを確保 */
}

.topic-card.expanded .topic-content::after {
    opacity: 0;
}

/* 展開ボタン */
.topic-expand {
    text-align: center;
    padding: 5px;
    cursor: pointer;
    color: #FFFFFF;
    background-color: rgba(0, 0, 0, 0.2);
    border-top: 1px dashed rgba(255, 255, 255, 0.3);
    font-size: 14px;
}

.topic-expand::after {
    content: '▼ 続きを読む';
}

.topic-card.expanded .topic-expand::after {
    content: '▲ 閉じる';
}

.topic-content a {
    color: #FF99FF;
    text-decoration: none;
    font-weight: bold;
}

.topic-content a:hover {
    text-decoration: underline;
    color: #FFCCFF;
}

/* レスポンシブ対応 */
@media only screen and (max-width: 768px) {
    .topic-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .topic-date {
        align-self: flex-end;
    }
}