/* Mobile/Smartphone styles (767px and below) - 最適化版 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: #0a0a0a;
    color: #ffffff;
    overflow-x: hidden;
    min-height: 100vh;
}

/*padding_top
------------------------------------------*/
.p0 {padding:0 !important;}
.pt10 {padding-top:10px !important;}
.pt20 {padding-top:20px !important;}
.pt30 {padding-top:30px !important;}
.pt40 {padding-top:40px !important;}
.pt50 {padding-top:50px !important;}
.pt60 {padding-top:60px !important;}
.pt70 {padding-top:70px !important;}
.pt80 {padding-top:80px !important;}
.pt90 {padding-top:90px !important;}
.pt100 {padding-top:100px !important;}

/*padding_right
------------------------------------------*/
.pr0 {padding-right:0 !important;}
.pr5 {padding-right:5px !important;}
.pr10 {padding-right:10px !important;}
.pr20 {padding-right:20px !important;}
.pr30 {padding-right:30px !important;}
.pr40 {padding-right:40px !important;}
.pr50 {padding-right:50px !important;}
.pr60 {padding-right:60px !important;}
.pr70 {padding-right:70px !important;}
.pr80 {padding-right:80px !important;}
.pr90 {padding-right:90px !important;}
.pr100 {padding-right:100px !important;}

/*padding_bottom
------------------------------------------*/
.pb0 {padding--bottom:0 !important;}
.pb10 {padding-bottom:10px !important;}
.pb20 {padding-bottom:20px !important;}
.pb30 {padding-bottom:30px !important;}
.pb40 {padding-bottom:40px !important;}
.pb50 {padding-bottom:50px !important;}
.pb60 {padding-bottom:60px !important;}
.pb70 {padding-bottom:70px !important;}
.pb80 {padding-bottom:80px !important;}
.pb90 {padding-bottom:90px !important;}
.pb100 {padding-bottom:100px !important;}

/*padding_left
------------------------------------------*/
.pl0 {padding-left:0 !important;}
.pl5 {padding-left:5px !important;}
.pl10 {padding-left:10px !important;}
.pl20 {padding-left:20px !important;}
.pl30 {padding-left:30px !important;}
.pl40 {padding-left:40px !important;}
.pl50 {padding-left:50px !important;}
.pl60 {padding-left:60px !important;}
.pl70 {padding-left:70px !important;}
.pl80 {padding-left:80px !important;}
.pl90 {padding-left:90px !important;}
.pl100 {padding-left:100px !important;}

/*border-radius
------------------------------------------*/
.r0 {border-radius:0px !important;}
.r5 {border-radius:5px !important;}
.r10 {border-radius:10px !important;}
.r20 {border-radius:20px !important;}
.r30 {border-radius:30px !important;}
.r40 {border-radius:40px !important;}
.r50 {border-radius:50px !important;}
.r60 {border-radius:60px !important;}
.r70 {border-radius:70px !important;}
.r80 {border-radius:80px !important;}
.r90 {border-radius:90px !important;}
.r100 {border-radius:100px !important;}

/*color
------------------------------------------*/
/* ===== グレー系 ===== */
.text-gray-100 { color: #f7f7f7; }
.text-gray-200 { color: #eeeeee; }
.text-gray-300 { color: #e0e0e0; }
.text-gray-400 { color: #bdbdbd; }
.text-gray-500 { color: #9e9e9e; }
.text-gray-600 { color: #757575; }
.text-gray-700 { color: #616161; }
.text-gray-800 { color: #424242; }
.text-gray-900 { color: #212121; }

/* ===== 基本 ===== */
.text-white { color: #ffffff; }
.text-black { color: #000000; }

/* ===== カラフル系 ===== */
.text-red { color: #e53935; }
.text-pink { color: #ec407a; }
.text-purple { color: #8e24aa; }
.text-deep-purple { color: #5e35b1; }
.text-indigo { color: #3949ab; }
.text-blue { color: #1e88e5; }
.text-light-blue { color: #29b6f6; }
.text-cyan { color: #00acc1; }
.text-teal { color: #00897b; }
.text-green { color: #43a047; }
.text-light-green { color: #7cb342; }
.text-lime { color: #c0ca33; }
.text-yellow { color: #fdd835; }
.text-amber { color: #ffb300; }
.text-orange { color: #fb8c00; }
.text-deep-orange { color: #f4511e; }
.text-brown { color: #6d4c41; }

/* ===== UI系（アクセント） ===== */
.text-primary { color: #2962ff; }
.text-secondary { color: #455a64; }
.text-success { color: #4caf50; }
.text-warning { color: #ffa000; }
.text-danger { color: #d32f2f; }
.text-info { color: #0288d1; }

.play-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #335fff;
    color: #fff;
    padding: 4px 18px;      /* 横長に見える余白 */
    border-radius: 5px;    /* 角丸 */
    font-size: 0.7rem;
    font-weight: 600;
}

.play-label i {
    color: #fff;            /* アイコンを白に */
    font-size: 0.7rem;
}

/* アニメーション背景 */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #000000, #1a1a2e, #16213e, #0f3460);
    background-size: 400% 400%;
    /* animation: gradientShift 10s ease infinite; */ /* 軽量化のため無効化 */
    z-index: -2;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* パーティクル効果 */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(0, 255, 255, 0.7);
    border-radius: 50%;
    animation: float 8s infinite linear;
}

@keyframes float {
    0% {
        transform: translateY(100vh) translateX(0px);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) translateX(100px);
        opacity: 0;
    }
}

/* メインコンテナ */
.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* ヘッダーエリア全体（動画背景） */
.header-section {
    position: relative;
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 15px 8px;
    overflow: hidden;
}

/* 動画背景 */
.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.hero-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.2;
}

.video-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(0, 255, 255, 0.3);
    font-size: 0.85rem;
    text-align: center;
    opacity: 0.3;
    padding: 0 10px;
}

/* ロゴセクション */
.logo-section {
    text-align: center;
    margin-bottom: 15px;
    position: relative;
    z-index: 2;
}

.logo-container {
    display: inline-block;
    position: relative;
    padding: 10px;
}

.logo-container img {
    max-height: 40px;
    width: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 255, 255, 0.3));
    transition: all 0.3s ease;
}

.logo-container:hover img {
    transform: scale(1.05);
    filter: drop-shadow(0 6px 12px rgba(0, 255, 255, 0.5));
}

/* タイトル */
.title {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
    padding: 0 10px;
}

.title-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-direction: column;
    margin-bottom: 12px;
}

.title-text {
    text-align: center;
}

.title h1 {
    font-size: 1.8rem;
    font-weight: bold;
    background: linear-gradient(45deg, #00ffff, #ff0080, #ffff00, #8000ff);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleGlow 3s ease-in-out infinite alternate, gradientShift 8s ease infinite;
    text-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
    letter-spacing: 0.5px;
    margin: 0;
    line-height: 1.3;
}

.character-left, .character-right {
    width: 60px;
    height: 60px;
    position: relative;
}

.character-left img, .character-right img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 8px 16px rgba(0, 255, 255, 0.4));
    animation: characterFloat 3s ease-in-out infinite;
}

.character-left img {
    animation-delay: 0s;
}

.character-right img {
    animation-delay: -1.5s;
}

@keyframes characterFloat {
    0%, 100% { transform: translateY(0px) rotate(-2deg); }
    50% { transform: translateY(-6px) rotate(2deg); }
}

@keyframes titleGlow {
    0% { filter: brightness(1); }
    100% { filter: brightness(1.2) drop-shadow(0 0 20px rgba(0, 255, 255, 0.5)); }
}

.subtitle {
    font-size: 0.85rem;
    color: #b0b0b0;
    margin-top: 10px;
    letter-spacing: 0.5px;
    line-height: 1.4;
}

/* コンテンツセクション */
.content-section {
    background: #0a0a0a;
    padding: 20px 8px;
    position: relative;
    z-index: 2;
}

/* 章リンクコンテナ */
.chapters {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding: 0 5px;
}

/* 章カード */
.chapter-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 12px;
    padding: 15px;
    text-decoration: none;
    color: inherit;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transform: translateY(0);
    display: flex;
    flex-direction: column;
}

.chapter-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(0, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s;
    opacity: 0;
}

.chapter-card:hover::before {
    animation: shimmer 1.5s ease-in-out;
    opacity: 1;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.chapter-card:hover {
    transform: translateY(-3px) scale(1.01);
    border-color: rgba(0, 255, 255, 0.6);
    box-shadow: 
        0 6px 30px rgba(0, 255, 255, 0.2),
        0 0 15px rgba(0, 255, 255, 0.1);
}

.chapter-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.chapter-icon {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid rgba(0, 255, 255, 0.5);
    flex-shrink: 0;
}

.chapter-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chapter-number {
    font-size: 0.75rem;
    color: #00ffff;
    font-weight: bold;
    text-transform: uppercase;
}

.chapter-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin: 5px 0 8px 0;
    color: #ffffff;
    line-height: 1.3;
}

.chapter-description {
    font-size: 0.8rem;
    color: #b0b0b0;
    line-height: 1.5;
    flex-grow: 1;
}

.chapter-preview {
    margin: 8px 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(0, 255, 255, 0.3);
    width: 100%;
}

.chapter-preview img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.chapter-card:hover .chapter-preview img {
    transform: scale(1.03);
}

.chapter-lessons {
    margin-top: 8px;
    font-size: 0.7rem;
    color: #00ffff;
    font-weight: bold;
    text-align: right;
}

/* 章リンク非活性 */ 
.chapter-card.disabled {
    position: relative;
    pointer-events: none;
    opacity: 0.2;
}

.chapter-card.disabled::after {
    content: "COMING SOON";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    background: rgba(0, 0, 0, 0.4);
    padding: 10px 0;
    z-index: 10;
}

.chapter-card.disabled::before {
    display: none;
}

/* スクロールバーカスタム */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #00ffff, #ff0080);
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #00cccc, #cc0066);
}

/* --- レッスンページ用スタイル --- */
/* ヘッダー */
.header {
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: none;
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0;
}

.header-content {
    max-width: 100%;
    margin: 0;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row;
    text-align: center;
    gap: 8px;
}

/* 進捗バーをヘッダー内に配置 */
.header-progress {
    padding: 6px 10px 8px 10px;
    width: 100%;
    background: transparent;
    border-bottom: 1px solid rgba(0, 255, 255, 0.3);
    position: static;
}

.progress-bar-container {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* ハンバーガーメニュー */
.hamburger-menu { 
    position: relative; 
    z-index: 101;
}

.hamburger-button {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.2), rgba(255, 0, 128, 0.2));
    border: 1px solid rgba(0, 255, 255, 0.5);
    border-radius: 8px;
    padding: 6px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    width: 36px;
    height: 36px;
    justify-content: center;
    align-items: center;
    gap: 2px;
}

.hamburger-button span {
    display: block;
    width: 16px;
    height: 2px;
    background: #ffffff;
    transition: all 0.3s ease;
}

.hamburger-button:hover {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.3), rgba(255, 0, 128, 0.3));
}

.menu-dropdown {
    position: absolute;
    top: 46px;
    left: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 12px;
    padding: 10px;
    min-width: 220px;
    max-width: 90vw;
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.menu-dropdown.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    margin: 3px 0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #ffffff;
    font-size: 0.8rem;
}

.menu-item:hover {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.1), rgba(255, 0, 128, 0.1));
}

.menu-item-icon {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #00ffff, #ff0080);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #000;
    font-weight: bold;
    flex-shrink: 0;
}

.menu-item-star {
    width: 14px;
    height: 14px;
    color: #ffdd00;
    font-size: 12px;
}

.menu-item.completed .menu-item-star { 
    opacity: 1; 
}

.menu-item:not(.completed) .menu-item-star { 
    opacity: 0.3; 
}

/* ロゴを非表示 */
.logo { 
    display: flex; 
    align-items: center; 
    gap: 0;
}

.logo img {
    display: none;
}

.progress-bar {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    height: 5px;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(90deg, #00ffff, #ff0080);
    height: 100%;
    width: 25%;
    border-radius: 6px;
    transition: width 0.5s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progressShine 2s ease-in-out infinite;
}

@keyframes progressShine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.lesson-info { 
    text-align: center;
    flex: 1;
}

.lesson-number { 
    font-size: 0.7rem; 
    color: #00ffff; 
    font-weight: bold; 
}

.lesson-title {
    font-size: 0.9rem;
    font-weight: bold;
    margin-top: 3px;
    background: linear-gradient(45deg, #00ffff, #ff0080);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.3;
}

/* 戻るボタン - アイコンのみ */
.back-button {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.2), rgba(255, 0, 128, 0.2));
    border: 1px solid rgba(0, 255, 255, 0.5);
    border-radius: 8px;
    padding: 0;
    text-decoration: none;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    font-size: 0;
    color: transparent;
}

.back-button::before {
    content: '\f359';
    font-family: 'Font Awesome 6 Free';
    font-weight: 400;
    font-size: 1.2rem;
    color: #ffffff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.back-button i {
    display: none;
}

.back-button:hover {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.3), rgba(255, 0, 128, 0.3));
}

/* 星プログレスバー */
.star-progress {
    position: fixed;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 40px;
    padding: 8px 15px;
    display: flex;
    gap: 8px;
    align-items: center;
    z-index: 200;
    transition: all 0.3s ease;
    max-width: 95vw;
    overflow-x: auto;
}

.star-slot {
    width: 26px;
    height: 26px;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
}

.star-slot:hover {
    border-color: rgba(255, 221, 0, 0.5);
    transform: scale(1.05);
}

.star-slot.filled {
    border: 2px solid #ffdd00;
    background: radial-gradient(circle, rgba(255, 221, 0, 0.2), transparent);
}

.star-icon {
    font-size: 14px;
    color: #ffdd00;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

.star-slot.filled .star-icon {
    opacity: 1;
    transform: scale(1);
}

/* メインコンテンツ */
.main-content {
    max-width: 100%;
    margin: 0 auto;
    padding: 15px 10px 70px 10px;
    position: relative;
    z-index: 1;
}

.lesson-section {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    scroll-margin-top: 100px;
}

.lesson-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00ffff, transparent);
    /* animation: shimmer 3s infinite; */ /* 軽量化のため無効化 */
}

.section-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 12px;
    background: linear-gradient(45deg, #00ffff, #ff0080);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-direction: column;
    text-align: center;
    line-height: 1.3;
}

.section-number {
    color: #000 !important;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    background: linear-gradient(135deg, #00ffff, #ff0080);
    -webkit-text-fill-color: #000 !important;
    -webkit-background-clip: border-box !important;
    background-clip: border-box !important;
    flex-shrink: 0;
}

.time-estimate {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.2), rgba(255, 152, 0, 0.2));
    border: 1px solid rgba(255, 193, 7, 0.5);
    border-radius: 20px;
    padding: 5px 12px;
    color: #ffc107;
    font-size: 0.7rem;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 12px;
    box-shadow: 0 2px 10px rgba(255, 193, 7, 0.2);
}

.step-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.step-card:hover {
    border-color: rgba(0, 255, 255, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 3px 15px rgba(0, 255, 255, 0.1);
}

.step-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-direction: column;
    text-align: center;
}

.step-number {
    background: linear-gradient(135deg, #ff0080, #8000ff);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.step-title {
    font-size: 1rem;
    font-weight: bold;
    color: #ffffff;
    line-height: 1.3;
}

.step-content {
    font-size: 0.85rem;
    color: #e0e0e0;
    margin-bottom: 12px;
    line-height: 1.6;
}

.video-section {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(67, 160, 71, 0.1));
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 10px;
    padding: 12px;
    margin: 12px 0;
    text-align: center;
}

.video-title {
    color: #4caf50;
    font-weight: bold;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.85rem;
}

.video-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 12px auto;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.confirmation-section {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.1), rgba(255, 0, 128, 0.1));
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 10px;
    padding: 12px;
    margin-top: 15px;
    text-align: center;
}

.confirmation-question {
    font-size: 0.85rem;
    margin-bottom: 12px;
    color: #ffffff;
    font-weight: bold;
    line-height: 1.4;
}

.done-button {
    background: linear-gradient(135deg, #00ff00, #00cc00);
    border: none;
    border-radius: 40px;
    padding: 10px 22px;
    color: #000;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 15px rgba(0, 255, 0, 0.3);
    min-height: 44px;
}

.done-button:hover {
    transform: scale(1.03);
    box-shadow: 0 5px 18px rgba(0, 255, 0, 0.4);
}

.done-button:disabled {
    background: rgba(128, 128, 128, 0.5);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.done-button.completed {
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: #000;
}

.star-animation {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 60px;
    color: #ffdd00;
    z-index: 300;
    opacity: 0;
    pointer-events: none;
    text-shadow: 0 0 30px rgba(255, 221, 0, 0.8);
}

@keyframes starPop {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0) rotate(0deg); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(180deg); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0.7) rotate(360deg); }
}

.star-animation.animate { 
    animation: starPop 1.5s ease-out; 
}

/* 画像の横並び修正 */
.image-container {
    text-align: center;
    margin: 12px 0;
    width: 100%;
    overflow: visible;
}

.image-container img {
    max-width: 100%;
    width: 100%;
    height: auto;
    border-radius: 6px;
    border: 1px solid rgba(0, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    margin: 8px auto;
    display: block;
}

.image-container img.small-image {
    max-width: 22%;
    width: auto;
    height: auto;
    border: none;
    box-shadow: none;
    display: inline-block;
    vertical-align: middle;
    margin: 3px 1%;
}

.image-container img.medium-image {
    max-width: 48%;
    width: 48%;
    height: auto;
    display: inline-block;
    vertical-align: top;
    margin: 4px 1%;
    border: 1px solid rgba(0, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border-radius: 6px;
}

.image-container img.large-image {
    display: block;
    margin: 8px auto;
    max-width: 100%;
    width: 100%;
}

.image-group {
    display: block;
    text-align: center;
    width: 100%;
    font-size: 0;
}

.image-caption {
    font-size: 0.7rem;
    color: #b0b0b0;
    margin-top: 6px;
    font-style: italic;
    line-height: 1.3;
}

.note-box {
    background: linear-gradient(135deg, rgba(255, 255, 0, 0.1), rgba(255, 128, 0, 0.1));
    border: 1px solid rgba(255, 255, 0, 0.3);
    border-radius: 8px;
    padding: 12px;
    margin: 12px 0;
}

.note-title {
    color: #ffff00;
    font-weight: bold;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
}

.note-title::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    content: "\f0eb"; /* デフォルト: 電球 */
    font-size: 1rem;
}

/* エラー用アイコン */
.note-title.error::before {
    content: "\f071"; /* 三角の警告マーク */
    color: #ffff00;
}

/* 情報用アイコン */
.note-title.info::before {
    content: "\f05a"; /* 情報マーク */
    color: #ffff00;
}

/* チェック用アイコン */
.note-title.success::before {
    content: "\f058"; /* チェックマーク */
    color: #ffff00;
}

/* 注意用アイコン */
.note-title.attention::before {
    content: "\f071"; /* 注意マーク */
    color: #ffff00;
}

/* ファイル＋ペンアイコン */
.note-title.filepen::before {
    content: "\f31c"; /* ペンマーク */
    color: #ffff00;
}

/* コードアイコン */
.note-title.code::before {
    content: "\f121"; /* コードマーク */
    color: #ffff00;
}

/* 個人アイコン */
.note-title.person::before {
    content: "\f183"; /* コードマーク */
    color: #ffff00;
}

/* グループアイコン */
.note-title.group::before {
    content: "\e533"; /* コードマーク */
    color: #ffff00;
}

/* 走るアイコン */
.note-title.run::before {
    content: "\f70c"; /* コードマーク */
    color: #ffff00;
}


.example-box {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 12px 0;
}

.example-box img {
    max-width: 100%;
    width: 100%;
    height: auto;
    border-radius: 6px;
}

.good-example,
.bad-example {
    padding: 12px;
    border-radius: 8px;
}

.good-example {
    background: linear-gradient(135deg, rgba(0, 255, 0, 0.1), rgba(0, 200, 0, 0.1));
    border: 1px solid rgba(0, 255, 0, 0.3);
}

.bad-example {
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.1), rgba(200, 0, 0, 0.1));
    border: 1px solid rgba(255, 0, 0, 0.3);
}

.example-title { 
    font-weight: bold; 
    margin-bottom: 8px; 
    font-size: 0.8rem;
}

.good-example .example-title { 
    color: #00ff00; 
}

.bad-example .example-title { 
    color: #ff4444; 
}

.control-list {
    background: rgba(0, 255, 255, 0.05);
    border-radius: 8px;
    padding: 12px;
    margin: 12px 0;
}

.control-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.control-item:last-child { 
    border-bottom: none; 
}

.control-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #00ffff, #0080ff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
    color: #fff;
}

.control-description {
    flex: 1;
    color: #fff;
    line-height: 1.4;
    font-size: 0.8rem;
}

.control-description strong {
    font-size: 0.95rem; /* バランス再現 */
    font-weight: bold;
}

.control-key {
    background: rgba(0, 255, 255, 0.2);
    border: 1px solid rgba(0, 255, 255, 0.5);
    border-radius: 3px;
    padding: 2px 5px;
    font-family: monospace;
    font-size: 0.7rem;
    color: #00ffff;
    margin: 0 1px;
    white-space: nowrap;
}

.image-with-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 8px 0;
    text-align: center;
    width: 100%;
}

.image-with-text img {
    display: block;
    margin-bottom: 6px;
    max-width: 100%;
    width: 100%;
    height: auto;
}

.play-button {
    background: linear-gradient(135deg, #ff0080, #8000ff);
    border: none;
    border-radius: 40px;
    padding: 12px 22px;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 15px auto;
    text-decoration: none;
    min-height: 44px;
}

.play-button:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(255, 0, 128, 0.3);
}

.lesson-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    gap: 10px;
    flex-direction: column;
}

.nav-button {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.2), rgba(255, 0, 128, 0.2));
    border: 1px solid rgba(0, 255, 255, 0.5);
    border-radius: 8px;
    padding: 12px 18px;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.85rem;
    width: 100%;
    min-height: 44px;
}

.nav-button:hover {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.3), rgba(255, 0, 128, 0.3));
    transform: translateY(-1px);
}

.nav-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* クイズ専用スタイル */
.student-info-form {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(0, 255, 255, 0.3);
    padding: 15px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 15px rgba(0, 255, 255, 0.1);
}

.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    font-weight: bold;
    margin-bottom: 6px;
    color: #e0e0e0;
    font-size: 0.8rem;
    line-height: 1.4;
}

.form-select, .form-input, .form-textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 0.85rem;
    transition: border-color 0.3s;
}

.form-select:focus, .form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.quiz-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    margin-bottom: 15px;
    border: 1px solid rgba(0, 255, 255, 0.3);
}

.quiz-container.active {
    display: block;
}

.quiz-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    flex-direction: column;
    text-align: center;
    gap: 8px;
}

.quiz-number {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
    flex-shrink: 0;
}

.quiz-title {
    color: #e0e0e0;
    font-size: 0.9rem;
    font-weight: bold;
    line-height: 1.3;
}

.quiz-question {
    font-size: 0.95rem;
    font-weight: bold;
    color: #e0e0e0;
    margin-bottom: 20px;
    line-height: 1.5;
    text-align: center;
}

.quiz-image {
    text-align: center;
    margin: 12px 0;
}

.quiz-image img {
    max-width: 100%;
    width: 100%;
    max-height: 200px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.quiz-options {
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
}

.quiz-option {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    background: rgba(255, 255, 255, 0.05);
    min-height: 44px;
}

.quiz-option:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #667eea;
}

.quiz-option.selected {
    background: rgba(33, 150, 243, 0.2);
    border-color: #2196f3;
}

.quiz-option.correct {
    background: rgba(76, 175, 80, 0.2);
    border-color: #4caf50;
}

.quiz-option.incorrect {
    background: rgba(244, 67, 54, 0.2);
    border-color: #f44336;
}

.option-letter {
    background: #667eea;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 10px;
    flex-shrink: 0;
    font-size: 0.8rem;
}

.quiz-option.correct .option-letter {
    background: #4caf50;
}

.quiz-option.incorrect .option-letter {
    background: #f44336;
}

.quiz-option > div:last-child {
    flex: 1;
    font-size: 0.8rem;
    color: #e0e0e0;
    line-height: 1.4;
}

.quiz-feedback {
    padding: 12px;
    border-radius: 8px;
    font-weight: bold;
    text-align: center;
    margin-top: 15px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    display: none;
    font-size: 0.8rem;
    line-height: 1.4;
}

.quiz-feedback.show {
    opacity: 1;
    transform: translateY(0);
    display: block;
}

.quiz-feedback.correct {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    border: 2px solid #4caf50;
}

.quiz-feedback.incorrect {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
    border: 2px solid #f44336;
}

.quiz-navigation {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
    flex-direction: column;
    align-items: center;
}

.quiz-submit, .action-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    white-space: nowrap;
    width: 100%;
    max-width: 320px;
    min-height: 44px;
}

.nav-button.prev {
    background: #6c757d;
    color: white;
}

.nav-button.next, .quiz-submit {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.action-button.save {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.action-button.restart {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: white;
}

.quiz-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    min-height: 350px;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 44px;
}

.radio-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.radio-item.selected {
    background: rgba(33, 150, 243, 0.2);
    border-color: #2196f3;
}

.radio-icon {
    width: 18px;
    height: 18px;
    border: 2px solid #ccc;
    border-radius: 50%;
    margin-right: 10px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.radio-item.selected .radio-icon {
    border-color: #2196f3;
}

.radio-item.selected .radio-icon::after {
    content: '';
    width: 8px;
    height: 8px;
    background: #2196f3;
    border-radius: 50%;
    position: absolute;
    top: 3px;
    left: 3px;
}

.radio-input {
    display: none;
}

.radio-label {
    flex: 1;
    font-size: 0.8rem;
    color: #e0e0e0;
    line-height: 1.4;
}

.quiz-results {
    text-align: center;
    padding: 20px 10px;
}

.quiz-score {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 15px;
}

.quiz-message {
    font-size: 1rem;
    margin-bottom: 20px;
    color: #e0e0e0;
    line-height: 1.4;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    flex-direction: column;
    align-items: center;
}

.loading-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.success-message, .error-message {
    display: none;
    padding: 12px;
    margin-top: 15px;
    border-radius: 8px;
    font-weight: bold;
    text-align: center;
    font-size: 0.8rem;
    line-height: 1.4;
}

.success-message {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    border: 2px solid #4caf50;
}

.error-message {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
    border: 2px solid #f44336;
}

.selection-feedback {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ポップアップスタイル */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.hidden {
    display: none !important;
}

.popup-content {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 15px;
    padding: 1.2rem;
    text-align: center;
    max-width: 90%;
    width: 100%;
    color: #fff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: popupIn 0.5s ease;
    position: relative;
}

.popup-content h2 {
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
    background: linear-gradient(45deg, #00ffff, #ff00ff, #ffff00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: bold;
    letter-spacing: 0.5px;
    line-height: 1.3;
}

.popup-content p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.popup-character {
    margin-top: 0.8rem;
    max-width: 120px;
    width: 100%;
    border-radius: 50%;
}

@keyframes popupIn {
    from {
        transform: scale(0.8) translateY(20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.close-btn {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #ccc;
    z-index: 1000;
    width: 32px;
    height: 32px;
}

.close-btn:hover {
    color: #fff;
}

/* テーブルスタイル */
.custom-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
    font-family: 'Arial', sans-serif;
}

.custom-table th,
.custom-table td {
    display: block;
    width: 100%;
    padding: 8px 12px;
    text-align: left;
    vertical-align: middle;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.custom-table th {
    background: linear-gradient(135deg, #00ffff, #ff0080);
    color: #000;
    font-weight: bold;
    border-radius: 6px 6px 0 0;
    font-size: 0.8rem;
}

.custom-table td {
    color: #000;
    background: #f0f0f0;
    border-radius: 0 0 6px 6px;
    font-size: 0.75rem;
    line-height: 1.4;
}

.custom-table tr {
    display: block;
    margin-bottom: 8px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.custom-table tr:hover th,
.custom-table tr:hover td {
    transform: translateY(-1px);
    box-shadow: 0 6px 10px rgba(0,0,0,0.15);
}

/* ===== Chapter03用スケジュール表 ===== */
.custom-table2 {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    font-size: 0.9rem;
}

.custom-table2 th,
.custom-table2 td {
    padding: 10px 8px;
    text-align: center;
    border: 1px solid rgba(0, 255, 255, 0.2);
}

.table2-header {
    background: linear-gradient(135deg, #00ffff, #ff0080);
    color: #000;
    font-weight: bold;
    font-size: 1.1rem;
    padding: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.table2-subheader {
    background: rgba(0, 255, 255, 0.15);
    color: #00ffff;
    font-weight: bold;
    font-size: 0.9rem;
    padding: 8px 6px;
}

.table2-lesson {
    background: linear-gradient(135deg, rgba(255, 0, 128, 0.2), rgba(128, 0, 255, 0.2));
    color: #fff;
    font-weight: bold;
    font-size: 0.9rem;
    min-width: 80px;
    border-right: 2px solid rgba(0, 255, 255, 0.3);
}

.table2-content {
    background: rgba(255, 255, 255, 0.05);
    color: #e0e0e0;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* ===== QRコード付きURLボックス ===== */
.url-qr-box {
    margin: 20px 0;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.1), rgba(255, 0, 128, 0.1));
    border: 2px solid rgba(0, 255, 255, 0.4);
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.url-qr-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(0, 255, 255, 0.05), transparent);
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

.url-qr-content {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: relative;
    z-index: 1;
}

.url-qr-text {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.url-qr-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: bold;
    color: #00ffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.url-qr-label i {
    font-size: 1.1rem;
    color: #ff0080;
}

.url-qr-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    color: #00ffff;
    text-decoration: none;
    font-weight: 600;
    padding: 10px 15px;
    background: rgba(0, 255, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 255, 0.3);
    transition: all 0.3s ease;
    word-break: break-all;
}

.url-qr-link:active {
    background: rgba(0, 255, 255, 0.2);
    transform: scale(0.98);
}

/* スマホではQRコードを非表示 */
.url-qr-code {
    display: none;
}

/* ダウンロードボタン */
.file-downloads {
    text-align: center;
    margin: 15px 0;
    padding: 0 10px;
}

.file-downloads .image-caption {
    font-size: 0.75rem;
    color: #b0b0b0;
    margin-bottom: 10px;
    line-height: 1.4;
}

.file-downloads .download-btn {
    display: none;
}

.download-btn {
    display: inline-block;
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.8rem;
    text-decoration: none;
    margin: 6px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 320px;
    text-align: center;
}

.download-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: left 0.3s ease;
}

.download-btn:hover::before {
    left: 100%;
}

.download-btn i {
    margin-right: 8px;
    font-size: 16px;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

.download-btn:active {
    transform: translateY(0);
}

.pdf-btn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border-color: rgba(231, 76, 60, 0.3);
}

.pdf-btn:hover {
    background: linear-gradient(135deg, #ff5e4d 0%, #d63a2c 100%);
    box-shadow: 0 6px 25px rgba(231, 76, 60, 0.4);
}

.word-btn {
    background: linear-gradient(135deg, #2a64bc 0%, #1d4e8c 100%);
    border-color: rgba(42, 100, 188, 0.3);
}

.word-btn:hover {
    background: linear-gradient(135deg, #3675d4 0%, #2558a0 100%);
    box-shadow: 0 6px 25px rgba(42, 100, 188, 0.4);
}

.ppt-btn {
    background: linear-gradient(135deg, #d54e21 0%, #b34419 100%);
    border-color: rgba(213, 78, 33, 0.3);
}

.ppt-btn:hover {
    background: linear-gradient(135deg, #f05a24 0%, #c44a1d 100%);
    box-shadow: 0 6px 25px rgba(213, 78, 33, 0.4);
}

/* その他ファイル - ダークグレー＋ネオン効果 */
.other-btn {
    background: linear-gradient(135deg, #335fff 0%, #1a3fd4 100%);
    border: 2px solid #5577ff;
    color: #fff;
}

.other-btn:hover {
    background: linear-gradient(135deg, #5577ff 0%, #335fff 100%);
    border-color: #7799ff;
    box-shadow: 0 6px 25px rgba(51, 95, 255, 0.4);
}

/* --- テキスト強調クラス --- */
.highlight-neon {
  font-weight: bold;
  background: linear-gradient(90deg, #00dfff, #80f0ff, #a0e8ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* ピンクグラデーション強調 */
.highlight-gradient {
  background: linear-gradient(90deg, #ff5faf, #ff8c00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: bold;
}

/* ゴールドグラデーション強調 */
.highlight-gold {
  font-weight: bold;
  background: linear-gradient(90deg, #ffd700, #ffec8b, #fff5d1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* テキストボックス強調 */
.highlight-ni {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3em 0.8em;
  font-weight: bold;
  font-size: 0.95em;
  color: #fff;
  background: linear-gradient(135deg, rgba(0,255,255,0.2), rgba(255,0,128,0.2));
  border: 1px solid rgba(0,255,255,0.6);
  border-radius: 8px;
  box-shadow: 
    0 0 10px rgba(0,255,255,0.5),
    inset 0 0 8px rgba(0,255,255,0.3);
  position: relative;
  overflow: hidden;
  line-height: 1;

  margin-left: 0.4em;   /* テキストとの隙間 */
  margin-right: 0.4em;
}

.highlight-ni::after {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255,255,255,0.5),
    transparent
  );
  /* animation: ni-shine 5s infinite; */ /* 軽量化のため無効化 */
}

@keyframes ni-shine {
  100% { left: 100%; }
}

/* 極小画面対応（320px以下） */
@media screen and (max-width: 320px) {
    .title h1 {
        font-size: 1.5rem;
    }
    
    .character-left, .character-right {
        width: 50px;
        height: 50px;
    }
    
    .section-title {
        font-size: 1rem;
    }
    
    .step-title {
        font-size: 0.9rem;
    }
    
    .star-slot {
        width: 24px;
        height: 24px;
    }
    
    .star-icon {
        font-size: 12px;
    }
}

/* --- 見出しスタイル --- */
.example-heading {
    background: linear-gradient(45deg, #00ffff, #ff0080);
    padding: 10px 16px;
    border-radius: 18px;
    margin-bottom: 16px;
    font-size: 1rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #000;
    letter-spacing: 0.8px;
    box-shadow: 0 0 12px rgba(0, 255, 255, 0.4), 0 0 25px rgba(255, 0, 128, 0.25);
}

.example-heading i {
    font-size: 1.1rem;
    color: #000;
}

.example-heading.advanced {
    background: linear-gradient(45deg, #ff0080, #ffff00, #8000ff);
    background-size: 200% 200%;
    -webkit-animation: gradientMove 3s ease-in-out infinite alternate;
    animation: gradientMove 3s ease-in-out infinite alternate;
    box-shadow: 0 0 12px rgba(255, 0, 128, 0.4), 0 0 25px rgba(128, 0, 255, 0.25);
}

@-webkit-keyframes gradientMove {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

/* --- トグル機能スタイル --- */
.toggleable-section {
    margin: 16px 0;
}

.toggle-button {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px dashed rgba(0, 255, 255, 0.4);
    border-radius: 10px;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    -webkit-transition: all 0.3s ease;
    transition: all 0.3s ease;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    -webkit-tap-highlight-color: transparent;
}

.toggle-button:active {
    background: rgba(0, 255, 255, 0.15);
    border-color: #00ffff;
    border-style: solid;
    box-shadow: 0 2px 10px rgba(0, 255, 255, 0.2);
}

.toggle-text {
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

.toggle-icon {
    -webkit-transition: -webkit-transform 0.3s ease;
    transition: transform 0.3s ease;
    font-size: 1rem;
    color: #00ffff;
}

.toggle-content {
    max-height: 0;
    overflow: hidden;
    -webkit-transition: max-height 0.5s ease, opacity 0.3s ease, padding 0.3s ease;
    transition: max-height 0.5s ease, opacity 0.3s ease, padding 0.3s ease;
    opacity: 0;
}

.toggle-content.show {
    max-height: 15000px;
    opacity: 1;
    padding-top: 16px;
}

/* --- 既存のcontrol-listとの相性調整 --- */
.toggle-content .control-list {
    margin-top: 0;
}

.toggle-content .control-item:first-child {
    margin-top: 0;
}

/* Roblox Studio風コードブロックスタイル（スマホ用・ライトモード） */
.code-block {
    background: #ffffff;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    margin: 20px 0;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    position: relative;
}

.code-header {
    background: #f3f3f3;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #d0d0d0;
}

.code-title {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #333333;
    font-weight: 600;
    font-size: 0.85rem;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.code-title i {
    color: #007acc;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.copy-button {
    background: #ffffff;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    padding: 8px;
    color: #333333;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
    display: flex !important; /* スマホでは常に表示（!importantで強制） */
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.copy-button:active {
    background: #e8e8e8;
    transform: scale(0.95);
}

/* hiddenクラスがあってもスマホでは表示 */
.copy-button.hidden {
    display: flex !important;
}

.copy-button i {
    margin: 0;
}

.copy-button span {
    display: none; /* テキストを非表示 */
}

.code-content {
    padding: 0;
    position: relative;
    background: #ffffff;
    display: grid;
    grid-template-columns: 35px 1fr;
    overflow-x: auto;
}

.code-caption {
    display: none; /* スマホではキャプション非表示 */
}

/* 行番号エリア */
.code-line-numbers {
    background: #f8f8f8;
    border-right: 1px solid #e0e0e0;
    color: #6e7681;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.75rem;
    line-height: 1.4;
    padding: 10px 6px;
    text-align: right;
    user-select: none;
    white-space: pre-line;
}

.code-textarea {
    width: 100%;
    background: transparent;
    border: none;
    color: #24292f;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.8rem;
    line-height: 1.4;
    padding: 10px;
    resize: none;
    overflow-y: hidden;
    overflow-x: auto;
    white-space: pre;
    outline: none;
    height: auto;
    min-height: fit-content;
    -webkit-overflow-scrolling: touch;
}

.code-textarea::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.code-textarea::-webkit-scrollbar-track {
    background: #f8f8f8;
}

.code-textarea::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 3px;
}

.code-textarea::-webkit-scrollbar-thumb:active {
    background: #b0b0b0;
}

.code-block {
    background: #ffffff;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    margin: 15px 0;
    overflow: visible; /* hiddenからvisibleに変更 */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    position: relative;
}

.code-header {
    background: #f3f3f3;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #d0d0d0;
    flex-wrap: wrap;
    position: relative; /* 追加 */
}

.code-title {
    font-size: 0.85rem;
    gap: 6px;
}

.code-title i {
    font-size: 0.8rem;
}

.copy-button {
    padding: 5px 10px;
    font-size: 0.75rem;
}

/* コピー完了チップ - 追加 */
.copy-tooltip {
    position: absolute;
    top: 100%;
    right: 5px;
    margin-top: 8px;
    background: #28a745;
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 10;
    white-space: nowrap;
    max-width: calc(100% - 20px);
}

.copy-tooltip.show {
    opacity: 1;
}

.copy-tooltip::after {
    content: '';
    position: absolute;
    top: -5px;
    right: 10px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid #28a745;
}

.code-content {
    grid-template-columns: 40px 1fr;
}

.code-line-numbers {
    font-size: 0.75rem;
    padding: 10px 4px;
}

.code-textarea {
    font-size: 0.75rem;
    padding: 10px 8px;
    line-height: 1.4;
}

.code-textarea:focus,
.code-textarea.active {
    background: #fffef0;
    outline: 2px solid #ffd700;
    outline-offset: -2px;
}

/* ===== Footer (Smartphone) ===== */
.site-footer {
    width: 100%;
    margin-top: 14px;
    padding: 16px 14px 20px;
    box-sizing: border-box;
}

.site-footer-note {
    margin: 0 auto;
    max-width: 100%;
    text-align: center;
    font-size: 0.75rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
}

/* ===== 企画書ダウンロードセクション ===== */
.planning-sheets-container {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    flex-direction: column;
    gap: 25px;
    margin: 25px 0;
}

.planning-sheet-item {
    background: -webkit-linear-gradient(315deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 15px;
    padding: 20px;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    flex-direction: column;
    gap: 18px;
    -webkit-transition: all 0.3s ease;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.planning-sheet-item::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: -webkit-linear-gradient(45deg, transparent, rgba(0, 255, 255, 0.05), transparent);
    background: linear-gradient(45deg, transparent, rgba(0, 255, 255, 0.05), transparent);
    -webkit-transform: rotate(45deg);
    transform: rotate(45deg);
    -webkit-transition: all 0.6s;
    transition: all 0.6s;
    opacity: 0;
}

.planning-sheet-item:hover::before {
    -webkit-animation: shimmer 1.5s ease-in-out;
    animation: shimmer 1.5s ease-in-out;
    opacity: 1;
}

.planning-sheet-item:hover {
    -webkit-transform: translateY(-5px);
    transform: translateY(-5px);
    border-color: rgba(0, 255, 255, 0.6);
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.2);
}

.planning-sheet-preview {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(0, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.95);
    -webkit-transition: -webkit-transform 0.3s ease;
    transition: transform 0.3s ease;
}

.planning-sheet-item:hover .planning-sheet-preview {
    -webkit-transform: scale(1.02);
    transform: scale(1.02);
}

.planning-sheet-preview img {
    width: 100%;
    height: auto;
    display: block;
}

.planning-sheet-download {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    flex-direction: column;
    gap: 12px;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    text-align: center;
}

.planning-sheet-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #00ffff;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.planning-sheet-title i {
    font-size: 1.3rem;
    color: #ff0080;
}

.planning-sheet-desc {
    font-size: 0.9rem;
    color: #b0b0b0;
    margin: 0;
}

.planning-sheet-item .download-btn {
    display: none;
}

/* ===== Chapter振り返りボックス（スマートフォン） ===== */
.chapter-summary-box {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.1), rgba(255, 0, 128, 0.1));
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 12px;
    padding: 15px;
    margin: 15px 0;
    position: relative;
    overflow: hidden;
}

.chapter-summary-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.chapter-summary-badge {
    background: linear-gradient(135deg, #00ffff, #ff0080);
    color: #000;
    padding: 6px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 10px rgba(0, 255, 255, 0.3);
    display: inline-block;
    width: fit-content;
}

.chapter-summary-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #ffffff;
    margin: 0;
    line-height: 1.3;
}

.chapter-summary-content {
    position: relative;
    z-index: 1;
}

.chapter-summary-list {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
}

.chapter-summary-list li {
    padding: 8px 0 8px 28px;
    position: relative;
    color: #e0e0e0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.chapter-summary-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #00ff00;
    font-weight: bold;
    font-size: 1.1rem;
}

.chapter-summary-growth {
    background: rgba(255, 215, 0, 0.1);
    border-left: 3px solid #ffd700;
    padding: 12px 15px;
    border-radius: 6px;
    color: #ffd700;
    font-size: 0.95rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.4;
}

.chapter-summary-growth i {
    font-size: 1.1rem;
    margin-top: 2px;
    flex-shrink: 0;
}

/* ===== スキル一覧（スマートフォン） ===== */
.skills-showcase {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.skill-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 10px;
    padding: 15px;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.skill-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #00ffff, #ff0080);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 3px 12px rgba(0, 255, 255, 0.3);
}

.skill-icon i {
    font-size: 1.5rem;
    color: #000;
}

.skill-content h5 {
    margin: 0 0 6px 0;
    font-size: 1.05rem;
    color: #00ffff;
    font-weight: bold;
}

.skill-content p {
    margin: 0;
    color: #e0e0e0;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* ===== 今後の学習ボックス（スマートフォン） ===== */
.future-learning-box {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.15), rgba(75, 0, 130, 0.15));
    border: 2px solid rgba(138, 43, 226, 0.4);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 3px 15px rgba(138, 43, 226, 0.2);
}

.future-learning-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.future-learning-header i {
    font-size: 1.5rem;
    color: #ff0080;
}

.future-learning-header h5 {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ffffff;
    margin: 0;
}

.future-learning-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
}

.future-learning-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(138, 43, 226, 0.3);
}

.future-learning-item i {
    font-size: 1.1rem;
    color: #00ffff;
    flex-shrink: 0;
    margin-top: 2px;
}

.future-learning-item span {
    color: #e0e0e0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.future-learning-note {
    color: #b0b0b0;
    font-style: italic;
    margin: 12px 0 0 0;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    border-left: 3px solid #8a2be2;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* ===== 完走お祝いセクション（スマートフォン） ===== */
.completion-celebration {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 140, 0, 0.15));
    border: 2px solid #ffd700;
    border-radius: 15px;
    padding: 20px;
    margin: 30px 0;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 0 25px rgba(255, 215, 0, 0.3),
        0 8px 30px rgba(0, 0, 0, 0.3);
}

.celebration-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
    position: relative;
    z-index: 1;
}

.celebration-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #000;
    padding: 8px 20px;
    border-radius: 40px;
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    box-shadow: 0 3px 15px rgba(255, 215, 0, 0.4);
    width: fit-content;
}

.celebration-badge i {
    font-size: 1.2rem;
}

.celebration-title {
    font-size: 2rem;
    font-weight: bold;
    background: linear-gradient(45deg, #ffd700, #ff8c00, #ffd700);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 15px 0;
    line-height: 1.2;
}

.celebration-message {
    font-size: 1rem;
    color: #ffffff;
    line-height: 1.6;
    margin-bottom: 20px;
}

.celebration-highlights {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
}

.celebration-highlight-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 15px;
    border-radius: 20px;
    border: 2px solid rgba(255, 215, 0, 0.5);
}

.celebration-highlight-item i {
    font-size: 1.3rem;
    color: #ffd700;
    flex-shrink: 0;
}

.celebration-highlight-item span {
    font-weight: bold;
    color: #ffffff;
    font-size: 0.95rem;
}

.celebration-future {
    font-size: 0.95rem;
    color: #e0e0e0;
    line-height: 1.6;
    margin: 20px 0;
}

.celebration-final {
    background: rgba(0, 0, 0, 0.3);
    border-left: 3px solid #ffd700;
    padding: 18px;
    border-radius: 8px;
    margin-top: 20px;
}

.celebration-final-message {
    font-size: 1.05rem;
    color: #ffd700;
    line-height: 1.6;
    margin-bottom: 15px;
}

.celebration-signature {
    font-size: 0.9rem;
    color: #b0b0b0;
    font-style: italic;
    text-align: right;
}

.celebration-image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    order: -1;
}

.celebration-image img {
    width: 100%;
    max-width: 280px;
    height: auto;
    border-radius: 12px;
    border: 2px solid #ffd700;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
}

.celebration-confetti {
    position: absolute;
    top: -10px;
    right: -10px;
    display: flex;
    gap: 8px;
    z-index: 2;
}

.celebration-confetti i {
    font-size: 1.8rem;
    color: #ffd700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
}

.celebration-confetti i:nth-child(2) {
    font-size: 2.2rem;
}

/* Chapter振り返りボックス - 画像対応版（スマートフォン） */
.chapter-summary-body {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 15px;
}

.chapter-summary-content {
    position: relative;
    z-index: 1;
    order: 2;
}

.chapter-summary-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.chapter-summary-image {
    order: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chapter-summary-image img {
    width: 100%;
    max-width: 250px;
    height: auto;
    border-radius: 10px;
    border: 2px solid rgba(0, 255, 255, 0.5);
    box-shadow: 0 3px 12px rgba(0, 255, 255, 0.3);
}

/* ===== 第20回専用 完走お祝いオーバーレイ（スマートフォン） ===== */
.completion-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.completion-overlay.hidden {
    display: none !important;
}

.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.confetti-piece {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #ffd700;
    top: -10px;
    opacity: 0;
    animation: confetti-fall linear forwards;
}

.completion-final-celebration {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.95), rgba(255, 140, 0, 0.95));
    border: 3px solid #ffd700;
    border-radius: 20px;
    padding: 35px 25px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    position: relative;
    z-index: 10;
    box-shadow: 
        0 0 40px rgba(255, 215, 0, 0.6),
        0 15px 50px rgba(0, 0, 0, 0.5);
}

.completion-trophy {
    margin-bottom: 20px;
}

.completion-trophy i {
    font-size: 60px;
    color: #000;
}

.completion-final-title {
    margin: 0 0 20px 0;
    font-weight: bold;
    color: #000;
    line-height: 1.3;
}

.title-line-1 {
    display: block;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
}

.title-line-2 {
    display: block;
    font-size: 2rem;
}

.completion-stars {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.completion-stars i {
    font-size: 2rem;
    color: #000;
}

.completion-stars i:nth-child(2) {
    font-size: 2.5rem;
}

.completion-final-message {
    font-size: 1.1rem;
    color: #000;
    line-height: 1.6;
    margin: 20px 0 30px 0;
    font-weight: 600;
}

.completion-close-btn {
    background: #000;
    color: #ffd700;
    border: 2px solid #000;
    border-radius: 40px;
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* 外部リンクスタイル */
.external-link {
    color: #4a9eff;
    font-weight: 600;
    font-size: 1em; /* 標準サイズ */
    text-decoration: none;
    display: inline-block;
    line-height: 1.6; /* タップしやすく */
}

/* hoverなし（タッチデバイス） */

.external-link i {
    font-size: 0.85em;
    margin-left: 4px;
    opacity: 0.8;
}

.link-desc {
    color: #f0f0f0;
    font-size: 1em; /* 読みやすく */
    margin-top: 10px;
    line-height: 1.7;
}

/* 小見出しスタイル */
.subsection-title {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1em;
    margin: 18px 0 12px 0;
    display: block; /* 全幅表示 */
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
    text-align: left;
}

.subsection-title i {
    margin-right: 6px;
    font-size: 0.95em;
}