:root{
    --primary-color: #436bec;
    --secondary-color: #ff6600;
    --text-color: #333;
    --success-color: #28a745;
    --btn-color : #e08e00;
    --btn-text-color : #fff;
    --btn-shadow-color : #ab7820;
    --btn-back-color: #eee;
}

*{ box-sizing: border-box; }
a{text-decoration: none; color: var(--primary-color);}
img{
    -webkit-user-drag: none;
    -moz-user-select: none;
    user-select: none;
}
body {
    margin: 0;
    padding: 0;
    font-family: 'Questrial', Verdana, "ヒラギノ角ゴ ProN W3", "Hiragino Kaku Gothic ProN", "メイリオ", Meiryo, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;

}

/* ルートフォントサイズをデバイスの幅に応じて変更 */
html {
    font-size: 16px; /* デフォルト */
  }

  @media (max-width: 600px) {
    html {
      font-size: 14px; /* スマホ */
      line-height: 21px;
    }
  }

  @media (min-width: 601px) and (max-width: 1024px) {
    html {
      font-size: 15px; /* タブレット */
    }
  }

  @media (min-width: 1025px) {
    html {
      font-size: 15px; /* PC */
    }
  }

  /* 残りのスタイル */
  body {
    font-size: 1rem; /* htmlのフォントサイズに依存 */
  }
/* ルートフォントサイズをデバイスの幅に応じて変更 */


h1{ font-size: 1.5rem; }
h2{ font-size: 1.2rem; }
h3{ font-size: 1rem; }
h4{ font-size: 1rem; }

pre {
    white-space: pre-wrap; /* これにより、テキストが折り返されます */
    word-wrap: break-word; /* 長い単語やURLが折り返されます */
    overflow-wrap: break-word; /* テキストが親要素の幅を超えた場合に折り返します */
    font-family: 'Questrial', Verdana, "ヒラギノ角ゴ ProN W3", "Hiragino Kaku Gothic ProN", "メイリオ", Meiryo, sans-serif;
    font-size: 1rem;
    line-height: 2;
}
.word-break-all { word-break: break-all; }
.keep-all { word-break: keep-all; }
  

label{
    display: block;
    margin-bottom: 5px;
    color: var(--text-color);
}
footer{
    /*margin-top: auto;*/
    margin-top: 2em;
    width: 100%;
}
footer .copyright{
    text-align: center;
    margin: 10px;
    display: flex;
    justify-content: center;
    gap: 1em;
}
footer .copyright a{
    color: #333;
}

/* container */
.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
    padding-top: 80px;
    margin-bottom: 80px;
    position: relative;
}
/* MODAL */
#modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    z-index: 100; 
    text-align: center;
}
#modal-overlay.show{ display: block; }
#modal {
    border-radius: 8px;
    background-color: #fff;
    border: 1px solid #888;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);

    
    position: fixed;
    top: 50%;
    left: 50%;
    top: 50%; /* 上端を画面中央に移動 */
    left: 50%; /* 左端を画面中央に移動 */
    transform: translate(-50%, -50%); /* 中央揃えに移動 */
    max-width: 95vw;
    padding: 10px;
}
#modal-head{ display: flex; justify-content: end; margin-bottom: 10px; }
#modal-close{ cursor: pointer; border: 1px solid #aaa; color: #aaa; font-size: 1.5em; border-radius: 4px; width: 1.5em;  height: 1.5em; display: flex; align-items: center; justify-content: center;}
#modal-content{ max-height: 80vh; overflow-y: auto; }

/* 一般的な input 要素全般のスタイル */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"],
input[type="week"],
input[type="color"],
input[type="file"],
textarea,
select {
    width: 100%;
    padding: 10px;
    margin-bottom: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    line-height: 1.5;
    height: 40px; /* 入力フィールドの高さを設定 */
}
textarea{
    resize:vertical;
    min-height: 5em;

}

/* フォーカス時のスタイル */
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="datetime-local"]:focus,
input[type="month"]:focus,
input[type="week"]:focus,
input[type="color"]:focus,
input[type="file"]:focus,
textarea:focus,
select:focus {
    border-color: var(--primary-color); /* フォーカス時のボーダーカラー */
    outline: none;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5); /* フォーカス時の影 */
}

/* 無効な input 要素のスタイル */
input:disabled,
textarea:disabled,
select:disabled {
    background-color: #f0f0f0; /* 無効な状態の背景色 */
    cursor: not-allowed;
}
.input-group{
    display: flex;
    align-items: center;
}
.input-group .label,.input-group label{
    min-width: 150px;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #eee;
    padding: 0 1em;
    font-size: 16px;
    line-height: 1.5;
    height: 40px; /* 入力フィールドの高さを設定 */
    margin: 0;
    margin-bottom: 10px;
}
.btn {
    min-width: 5em;
    padding: 0.5em 1em;
    display: inline-block;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    height: 40px; /* ボタンの高さを設定（入力フィールドと同じ） */
    background-color: #ddd; color: #333;
    font-size: 16px;
    margin-bottom: 5px;
}
.primary { background-color: var(--primary-color); color: #fff; }
.secondary { background-color: var(--secondary-color); color: #fff; }
.success { background-color: var(--success-color); color: #fff; }
.btn:hover, button:focus { background-color: #ccc; }
.btn:active { background-color: #aaa; }
.btn-container { border-top: 1px solid #f0f0f0; margin-top: 1em; padding-top: 1em; display: flex; align-items: center; justify-content: flex-end; gap: 1em; }
.btn.disabled,.btn:disabled { background-color: #ccc; color: #aaa; cursor: not-allowed; }

table {
    border-collapse: collapse;
    width: 100%;
}
th, td {
    border: 1px solid #dddddd;
    text-align: left;
    padding: 8px;
}

.flex{
    display: flex;
    align-items: center;
}
.flex-left{
    margin-right: auto;
}
.flex-right{
    margin-left: auto;
}

.breadcrumb{ display: flex; align-items: center; margin: .5em 1em; flex-wrap: wrap;}
.breadcrumb .breadcrumb-item { color: #333; padding-right: .5em; }
.breadcrumb .breadcrumb-item a{ color: #333; }
.breadcrumb .breadcrumb-item a:hover{ color: #007bff; }
.breadcrumb .breadcrumb-item + .breadcrumb-item::before { content: ">" !important; color: #aaa; padding-right: .5em;  }
.breadcrumb .breadcrumb-item.active{ color: #000; }

.btn-back-wrap{
    margin-left: .5em;
    white-space: nowrap;
    display: flex;
}
.btn-back {
    color: #333;
    padding: .5em;
    margin-bottom: .5em;
}
.btn-back::before { content: "<" !important; color: #aaa; padding-right: .5em;  }

.btn-back-r-wrap{
    margin-left: auto;
    white-space: nowrap;
}
.btn-back-r {
    color: #333;
    padding: 0 .5em;
    display: flex;
    align-items: center;
}
.btn-back-r img{
    height: 1.25em;
    margin-right: 0.2em;
}

/* エラーメッセージ内のリストスタイル */
.messages {
    padding: 0.5em;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    background-color: #fff;
    border-radius: 5px;
    padding-left: 0;
    cursor: pointer;
}
/* エラースタイル */
.messages.error {
    border-color: #d9534f;
    background-color: #f2dede;
    color: #a94442;
}
/* 情報スタイル */
.messages.info {
    border-color: #5bc0de;
    background-color: #d9edf7;
    color: #31708f;
}
.messages.success {
    border-color: #4CAF50;
    background-color: #E8F5E9;
    color: #306a32;
}
/* エラーメッセージ内の各エラー項目スタイル */
.messages li { margin: 0.25em 1.5em 0.25em 2em; }

/* common */
@media (max-width: 576px){
    .container { max-width: 540px; }
    #modal { max-width: 540px; }
}
@media (min-width: 576px){
    .container { max-width: 540px; }
    #modal { max-width: 540px; }
}
@media (min-width: 576px){
    .container { max-width: 540px; }
    #modal { max-width: 540px; }
}

@media (min-width: 700px){
    .container { max-width: 640px; }
    #modal { max-width: 640px; }
}
@media (min-width: 992px){
    .container { max-width: 960px; }
    #modal { max-width: 960px; }
}

@media (min-width: 1200px){
    .container { max-width: 1140px; }
    #modal { max-width: 1140px; }
}

/** panel/style ********************************/
.red{
    color: #f00;
}
.menu-container {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: .75em;
}
.menu-container.open{
    top: 5px; /* header borser-top分 */
    position: fixed;
}
.menu-container .menu-icon {
    position: relative;
    text-align: center;
    width: 35px;
    height: 40px;
    cursor: pointer;
}
.menu-container .bar {
    position: absolute;
    width: 100%;
    height: 5px;
    background-color: #828282;
    transition: all 0.3s ease;
}
.menu-container .bar:nth-child(1) { top: 10px; }
.menu-container .bar:nth-child(2) { top: 20px; }
.menu-container .bar:nth-child(3) { top: 30px; }

.menu-container.open .menu-icon .bar:nth-child(1) {
    top: 50%;
	transform: rotate(45deg);
}
.menu-container.open .menu-icon .bar:nth-child(2) {
    top: 50%;
    opacity: 0;
}
.menu-container.open .menu-icon .bar:nth-child(3) {
    top: 50%;
	transform: rotate(-45deg);
}
.menu-container .menu-text {
    font-size: 12px;
    color: #828282;
    user-select: none;
}
#menu-overlay{
    z-index: 100;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.2);
    display: none;
}
#menu-overlay.open{ display: block; }

#menu-overlay .menu-contents{
    background-color: #f2f2f2;
    color: #222;
    padding-top: 70px;
    display: flex;
    flex-direction: column;
    text-align: center;

    z-index: 101;
    transition: top 0.8s ease;
    position: fixed;
    left: 0;
    width: 100vw;
}
.menu-contents .menu-item{
    flex: 1;
    padding: 1em;
    border-top: 1px solid #222;
}

/** panel/style ********************************/
header {
    width:100%;
    background:#f2f2f2;
    border-top:5px solid #dadf00;
    border-bottom:1px solid #ddd; 
    display: block;
    position: relative;
}
header a{
    text-decoration: none;
    color: #000;
    transition: all 0.3s;
}
header h1{
    font-size: 1.2rem;
    margin: 15px 0 10px 20px;
}
header h1 img{
    width: 35px;
    vertical-align: middle;
    margin-top: -5px;
    margin-right: 5px;
}

.header-for-wide{ display: none; }
.header-for-small{ display: flex; }

.header-for-small h1{ font-size: 1rem; }
@media screen and (min-width: 1024px){
    .header-for-wide{ display: flex; }
    .header-for-small{ display: none; }
}

.header-user{
    display: block;
}

.header-mypage{
    display: block;
    margin-top: 0.25em;
    text-decoration: underline;
}


main{
    display: block;
    position: relative;
}
main .breadcrumb{
    min-height: 2em;
}
main .contents{
    display: block;
    position: relative;
    background:#f2f2f2;
    border: 1px solid #dddddd;
    width: 100%;
    margin: 0 auto;
    padding: 20px 1em;
    border-radius: 5px;
    margin-bottom: 20px;
}
@media screen and (min-width: 1024px){ /* pc */
    main .contents{
        padding: 20px 40px;
    }
}

main h2{
    width: 100%;
    margin-bottom: 10px;
    margin: 0 auto;
    padding: 0;
}

@media screen and (min-width: 1024px){ /* pc */
    header .inner{
        width: 960px;
        margin: 0 auto;
    }
    main .inner{
        width: 960px;
        margin: 0 auto;
    }

    header h1 {
        margin: 25px 0 10px;
    }
    
    header h1 img {
        width: 35px;
        vertical-align: middle;
        margin-right: 5px;
        margin-top: -5px;
    }
    header h1 a{
        padding: 1em 0;
    }

}

.m10{margin:10px;}
.mt10{margin-top: 10px;}
.mt40{margin-top: 40px;}
.mb10{margin-bottom: 10px;}
.mb20{margin-bottom: 20px;}
.mr10{margin-right: 10px;}
.p10{padding:10px;}
.btn-main {
    min-width: 5em;
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    color: var(--btn-text-color);
    background: var(--btn-color);
    box-shadow: 0 3px var(--btn-shadow-color);
    font-size: 16px;
    top: -2px;
}
.btn-main:hover, .btn-main:focus { top: 1px;box-shadow: none; background-color: var(--btn-color);}
.btn-main:active { background-color: var(--btn-color);}

.btn-main-disabled {
    min-width: 5em;
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    position: relative;
    font-size: 16px;
    top: 0;

    background-color: #ccc; color: #666; 
    box-shadow: none;
}


#sea-text.active{
    background-color: #f0f0ff;
}

/** items ********************************/
table.data-table {
    border-collapse: collapse;
    width: 100%;
}
.data-table th, .data-table td {
    border: 1px solid gray;
    text-align: left;
    padding: 10px;
    color: #333;
}
.data-table th{
    text-align: center;
    background-color: #f2f2f2;
}
.data-table td{
    text-align: center;
    background-color: #fff;
    word-break: break-all;
}
.menu-tab{
    display: flex;
    flex-wrap: wrap;
}
.menu-tab-item{
    flex: 0 0 50%; /* 幅を50%に設定して2列にする */
    background-color: #fff;
    /* border: 1px solid #ddd; */
    box-shadow : 0 0 0 1px  #ddd;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    align-items: center;
    padding: 0.5em;
    font-weight: bold;
    font-size: 1em;
    color: #333;
}
.menu-tab.col3 .menu-tab-item{
    flex: 0 0 33%;
}
.menu-tab.col4 .menu-tab-item{
    flex: 0 0 25%;
}
.menu-tab-item.active{
    background-color: #f2f2f2;
}


.course-list{
    padding-left:0;
    text-align: left;
}
.course-list li{
    list-style:none;
    display: flex;
    align-items: center;
    margin-bottom: .5em;
}
.course-list img{
    height: 2em;
    margin-right: 0.5em;
}
.course-list .course-name{
    font-size: 1em;
}
.org-course{
    text-align: left;
}

/** Home-List */
.welcome-user {
    margin: .5em 1em;
}
.welcome-info {
    padding: .5em 1em;
    background-color: #eee;
    margin-bottom: 1em;
}
.welcome-info pre{
    margin: 0.5em 1em;
}

.home-list{
    display: flex;
    flex-direction: column;
    background-color: #eee;
    margin-bottom: 1em;
}
.home-list-group{
    display: flex;
    flex-direction: column;
    border-radius: 5px;
    background-color: #fff;
    border-bottom: 2px solid rgb(226, 226, 226);
    margin: .5em 1em;
}
.home-list-group:first-child{ margin-top:1em; }
.home-list-group:last-child{ margin-bottom:1em; }
.home-list-group .sec{
    padding: 1em;
    background-color: #fff;
    align-items: center;
}
.home-list-group .sec-group{
    display: flex;
}
.home-list-group .sec-course{
    margin: 0.5em;
    margin-left: 1em;
    /* border-bottom: 1px solid rgb(226, 226, 226); */
    border-bottom: 1px solid #828282;
}
.home-list-group .sec-course:last-child{
    border-bottom: none;
}

.home-list-group .icon{
    width: 2em;
    margin-right: 1em;
}
.home-list-group .course-name{
    display: block;
    color: #333;
    font-weight: bold;
    /* border-right: 1px solid #aaa; */
}
.welcome-info {
    padding: .5em 1.5em;
}
.home-footer{
    background: #fff;
    margin: 2.5em 0;
    padding: 1em 1.5em;
    border: 1px solid #f2f2f2;
    border-radius: 4px;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
}
@media (max-width: 480px) {
    .xs-hide{
        display: none;
    }
    .home-list-group{
        font-size: 0.9em;
    }
    .course-per {
        flex-direction: column;
    }
    .course-per .per-text{
        margin-right: 0;
    }

}

.course-per{
    margin-left: auto;
    display: flex;
    align-items: center;
}
.per-text{
    margin-left: auto;
    margin-right: 1em;
    font-size: 0.8em;
    color: #666;
}
.bar{
    position: relative;
    height: .5em;
    background-color: #eee;
    width: 120px;
    border-radius: 5px;
}
@media screen and (max-width: 612px){
    .course-per .bar{ width: 100px; min-width: 100px; }
}
@media screen and (max-width: 400px){
    .course-per .bar{ width: 18vw;  min-width: 18vw;}
}
.bar-in{
    position: absolute;
    top:0; left:0;
    height: .5em;
    background-color: orange;
    width:0;
    border-radius: 5px;
}
/** Video-List */
.video-list-panel{
    display: flex;
    flex-direction: column;
    background-color: #eee;
    margin-bottom: 1.5em;
    padding: 1em;
}
.video-list-panel .study-icon {
    height: 1.2em;
}

.video-list{
    display: flex;
    flex-direction: column;
    background-color: #eee;
    margin-bottom: 1em;
    padding-top: 0.5em;
    padding-bottom: 0.5em;
}
.video-list-item{
    display: flex;
    border-radius: 5px;
    border-bottom: 2px solid rgb(226, 226, 226);
    
    background-color: #fff;
    margin: .5em 1em;
}
.video-list-item.hide{
    display: none;
}
.video-thumb{
    width: 200px;
    max-width: 30%;
    background-color: #fff;
    padding: 1em;
}
.video-thumb img{
    width: 100%;
    object-fit: cover;
}
.video-description{
    flex: 1;
    padding: 1em;

}
.video-description .video-title {
    font-weight: bold;
    color: #333;

    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: left;
    gap: 1.2em;
    
    padding-bottom: 1em;
    border-bottom: 1px solid #828282;
    margin-bottom: 1.5em;
}

.video-description .video-progress{
    font-size: 0.8em;
    color: #333;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: left;
    margin-bottom: 1em;
}
.video-description .video-progress .study-icon{
    margin-right: 1.2em;
}
.video-description .video-dates{
    font-size: 0.8em;
    color: #333;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: left;
    margin-bottom: 1em;
}
.video-description .video-dates .sepa{
    color: #eee;
    margin: 0 1.2em;
    user-select: none;
}
@media (max-width: 600px) {
    .video-description .video-dates{
        gap: 0.5em;
        flex-direction: column;
        align-items:start;
    }
    .video-description .video-dates .sepa{
        display: none;
    }
}

.video-description .video-detail{
    padding-top: 1em;
    border-top: 1px solid #eee;
    margin-top: 1.5em;

    font-size: 0.8em;
    color: #333;
}

.video-description .study-icon {
    height: 1.5em;
}

/***/

.study-icon{
    height: 1.5em;
}
.r-icon{
    background-color: #818181;
    color: #fff;
    padding: 0.2em 0.5em;
    border-radius: 4px;
}
.r-icon.comp{
    background-color: #DD854C;
}
.r-icon.study{
    background-color: #4C6EFA;
} 
.study-icon-container{
    display: flex;
    flex-direction: row; /* 横並びにするための設定（デフォルト値なので省略可能） */
    justify-content: flex-start; /* 要素を左揃え（デフォルト値） */
    align-items: center; /* 縦軸を中央揃え */
}
.study-icon-text{
    margin-left: 10px;
}
.study-icon.icon-hide{
    display: none;
}

.video-wrapper {
    position: relative;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
}
.video-wrapper:before {
    content: "";
    display: block;
    padding-top: 56.25%;
}
.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.watch-title{
    font-size: 1.5em;
    margin: 10px auto;
    overflow: hidden;
    margin-bottom: 10px;
}
.watch-tab{
    margin-top: 2em;
    display: flex;
    flex-wrap: wrap;
}
.watch-tab-item{
    flex: 1;
    background-color: #eee;
    border: 1px solid #828282;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    align-items: center;
    padding: 0.5em;
    color: #333;
    border-radius: 5px 5px 0 0;
}
.watch-tab-item.active{
    border-bottom: 1px solid #eee;
    z-index: 11;
}
.watch-tab-panel{
    background-color: #eee;
    position: relative;
    z-index: 10;
    border-top: 1px solid #828282;
    border-bottom: 1px solid #828282;
    margin-top: -2px;

    min-height: 5em;

    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;

}
.watch-tab-inner{
    position: relative;
    z-index: 10;
    margin-top: -2px;
    padding: 2.5em 2em;
    display: none;
}
.watch-tab-inner.active{
    display: block;
}
.watch-tab-panel pre{
    margin: 0;
    padding: 0;
    font-size: 1rem;
}

.watch-section-wrap{ margin: 0 1em; }
@media screen and (min-width: 1024px){
    .watch-section-wrap{ margin: 0 0em; }
}
