html,body{
  margin:0;
  padding:0;
  background-color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
}

.main-header-container{
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;

  display: flex;
  flex-direction: column;
  align-items: center;
}
.header-1{
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  height: 50px;
  padding: 0 10px; 
  box-sizing: border-box;
  background-color: #2b62b6;
  color: #ffffff;
  box-shadow: inset 0px -1px 0px 0px rgb(129 142 172);
  user-select: none;      /* テキストの選択を禁止する */
  
}
.right-group{
  justify-self: end;
  justify-content: flex-end;
  display: flex;
  align-items: center;
}
.left-group{
  justify-self: start;
}
.center-position{
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family:"Yu Gothic", "游ゴシック", YuGothic, "游ゴシック体";
  user-select: none;      
  pointer-events: none; 
}
.app-title{
  font-size:8px;
  font-weight: normal;
  color: #e0e0e0;
  margin: 0;
  margin-bottom: 2px;
}
.editing-file-info{
  font-size: 16px;
 
}
/*トグルボタン*/
.togle-container { 
  display: none;
  align-items: center; 
}
/* スイッチ本体（<label>タグ）のスタイル */
.toggle-switch {
  position: relative;   /* 中の「つまみ」を絶対位置で配置するときの基準点になる */
  display: inline-block;/* 他の要素と並びつつ、幅と高さを持たせる */
  width: 45px;          /* スイッチの溝の幅 */
  height: 26px;         /* スイッチの溝の高さ */
  cursor: pointer;      /* マウスカーソルを指マークにする（クリックできることを示す） */
  user-select: none;    /* スイッチの見た目部分のテキストを選択できないようにする（お好みで） */
  min-width: 45px;
}

/* ★★★ 本物のチェックボックスは画面から隠す！ ★★★ */
.toggle-switch input[type="checkbox"] {
  opacity: 0;   /* 透明にする */
  width: 0;     /* 幅を0にする */
  height: 0;    /* 高さを0にする */
  position: absolute; /* 他のレイアウトに影響を与えないようにする */
}
/* スイッチの溝（背景）とつまみの両方を担当する .slider のスタイル */
.slider {
  position: absolute; /* 親要素(.toggle-switch)を基準に絶対位置で配置 */
  top: 0;    /* 親要素の上端に合わせる */
  left: 0;   /* 親要素の左端に合わせる */
  right: 0;  /* 親要素の右端に合わせる */
  bottom: 0; /* 親要素の下端に合わせる */
  background-color: #ffffff; /* オフの時の溝の色 (灰色) */
  border-radius: 34px;   /* 角をスイッチの高さに合わせて丸くして、溝を楕円形にする */
  transition: background-color 0.3s; /* 背景色が変わるときのスーッていうアニメーション */
  box-shadow:  0px 0px 3px rgba(0, 0, 0, 0.8);
}
/* スイッチの丸い「つまみ」部分のスタイル (.slider の中に出てくるイメージ) */
.slider:before {
  position: absolute; /* .slider の中を基準に絶対位置で配置 */
  content: "";        /* CSSで要素を生成するためには必須 (中身は空でOK) */
  height: 20px;       /* つまみの高さ (溝の高さより少し小さい) */
  width: 20px;        /* つまみの幅 (溝の高さより少し小さい) */
  left: 3px;          /* オフの時の、溝の左端からの位置 */
  bottom: 3px;        /* 溝の下端からの位置 */
  background-color: rgb(255, 255, 255); /* つまみの色 (白) */
  border-radius: 50%;   
  transition: transform 0.3s; 
  box-shadow: 0 0 5px rgba(0,0,0,0.7); 
}

/* 1. スイッチの溝 (.slider) の背景色をオンの色に変える */
.toggle-switch input[type="checkbox"]:checked + .slider {
  background-color: #6eda72; 
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.2)
}
/* 2. つまみ (.slider:before) を右に動かす */
.toggle-switch input[type="checkbox"]:checked + .slider:before {
  transform: translateX(19px); 
  box-shadow: 0 0 5px rgba(0,0,0,0.4);
}

.toggle-switch input[type="checkbox"]:focus + .slider {
  box-shadow: 0 0 1px #6eda72; 
}
/* スイッチの横に表示するテキストのスタイル */
.drive-status-text {
  margin-left: 10px; /* スイッチ本体との間に少し隙間をあける */
  font-size: 12px;   /* 文字の大きさ */
  color: #ffffff;      /* 文字の色 (お好みで) */
   font-family: 'M PLUS Rounded 1c', sans-serif;
  font-weight: 300;
  user-select: none;      
  pointer-events: none; 
}



.header-2{
  display: flex;
  align-items: center;
  margin: 10px 15px;
  background-color: #f8f9fa;
  border-bottom:1px solid #dadce0 ;
  
}
.header-controls{
  display: flex;
  height: 40px;
  justify-content: center;
  align-items: center;
}

.toolbar-item {
  padding: 0px 27px; /* ボタンの押しやすいように余白を調整 */
  height: 40px;
  transition: background-color 0.2s ease;
  border-right: 1px solid #dadce0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toolbar-item:hover {
  background-color: rgba(0, 0, 0, 0.08);
}

.toolbar-item button {
  background-color: transparent; /* 背景を完全に透明に */
  border: none;                  /* 枠線を完全になくす */
  padding: 4px;                  /* 最低限の余白 */
  cursor: pointer;
  font-size: 14px;
  border-radius: 0; /* ボタン自体の角丸は不要 */
  color: #333;
  user-select: none; 
  pointer-events: none;
}



/*3点ボタン*/
.options-button {
  display: flex;  
  flex-direction: column;    
  justify-content: center; 
  align-items: center;   /* 垂直方向の中央揃え */
  
  background-color: transparent; /* 常に透明にする */
  border: none;/* 枠に対して、少しだけ内側に余白を持たせる */
  width: auto;  /* 幅と高さは中の点に合わせて自動にする */
  height: 40px;
  border-radius: 0; /* 枠が四角なので、ボタン自体の角丸は不要 */
  cursor: pointer; /* ボタンの上でもカーソルを指マークに */
}

#mainmenue {
  display: none; 
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5000; 
}
.mainmenue-nakami {
  position: absolute; 
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: 1px solid #ddd;
  min-width: 200px;
  padding: 8px 0; 
  list-style: none; 
  margin: 0;
}
.mainmenue-nakami li a {
  display: block; 
  padding: 10px 20px;
  color: #333;
  text-decoration: none; 
  transition: background-color 0.2s ease;
}
.mainmenue-nakami li a:hover {
  background-color: #f5f5f5;
}
.options-button:hover {
  background-color: rgba(0, 0, 0, 0.08);
}

.dot {
  display: block;      
  width: 4px;            
  height: 4px;           
  background-color: #5f6368; 
  border-radius: 50%;    
  margin: 2px 0;         
}



.a4-page{
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  margin-top:45px;
  min-width: 50%;
    
  }

.vertical-text{
  flex:1 1 70%;
  min-width: 300px;
  height: 175px;
   writing-mode: vertical-rl; /* 縦書き、右から左へ */
  -webkit-writing-mode: vertical-rl; /* Safari、Chrome用 */
  border: none; 
  padding: 10px 10px ; 
  border-bottom: 1px solid rgb(153, 153, 153);
}


.vertical-block{
  display: flex;
  flex-direction: row;
  align-items: start;
  width: 100%;
  padding-bottom: 9px;
  max-width: 1000px;
}

.vertical-block>p{
  display: flex;
  justify-content: center;
  align-items: center;
  align-self: center;
  width: 30px;
  height: 175px;
  margin: 0px;
  font-size: 1.2em;
  font-weight: 300;
  user-select: none;
  pointer-events: none;
  
  
  
}
.title-text{
  flex: 0 1 10%;
  height: 175px;
  writing-mode: vertical-rl; /* 縦書き、右から左へ */
  -webkit-writing-mode: vertical-rl; /* Safari、Chrome用 */
  border: none; 
  padding:  10px 10px; 
  margin-left: 10px;
  font-size: 14px;
  border-left:1px dashed #ccc;
  border-bottom:1px dashed #ccc;
  
}

.vertical-text:focus,
.title-text:focus { 
  outline: 1px dashed #ccc; 
}

.title-input:focus{
  outline: none;
}

.title-input,
.title-text,
.vertical-text{
  font-family:  'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif; 
}

.title-input {
  display: block; 
  width: 80%;    
  max-width: 600px; 
  margin: 70px auto 20px auto; 
  padding: 15px;
  font-size: 20px;
  border:none;
  border-bottom: 1px solid #c9c9c9;
  text-align: center;
}


.googleButton{
  margin: 10px;
  right: 10px;
  width: 200px;
  
  
}

textarea{
  resize:none;
}

#userIcon {
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  display: none;
  
}

#userIcon:hover {
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.1);  
  background-color: rgba(0, 0, 0, 0.05);    
}


/* --- モーダルウィンドウのスタイル --- */
#fileModalOverlay {
  display: none; 
  position: fixed; 

  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6); 
  z-index: 4000; 
  justify-content: center; 
  align-items: center; 
}

.modal-content {
  background-color: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  width: 90%;
  max-width: 400px;
  text-align: center;
  position: relative; 
}

.modal-close-button {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
  color: #888;
}

.modal-close-button:hover {
  color: #333;
}

#fileNameInput {
  width: calc(100% - 20px); 
  padding: 10px;
  margin-top: 20px;
  margin-bottom: 20px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
}

#modalActionButton {
  padding: 10px 20px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
}

#modalActionButton:hover {
  background-color: #0056b3;
}



/*読み込みモーダル*/
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
   
}
.modal-header h2 {
    margin: 0;
    font-size: 20px;
}
.view-toggle-buttons {
    display: flex;
    margin-right: 20px;
}
.view-toggle-buttons button {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
    padding: 6px;
    border: 1px solid #ccc;
    background-color: #fff;
    cursor: pointer;
    color: #555;
    border-radius: 4px;
    margin-left: 5px;
}
.view-toggle-buttons button svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}
.view-toggle-buttons button.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}



/* ファイルリストの ul タグの基本スタイル */
#driveFileListContainer ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

/* --- リスト表示用のスタイル --- */
#driveFileListContainer.view-list .drive-file-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    text-align: left; 
}
#driveFileListContainer.view-list .drive-file-item:hover {
    background-color: #f0f0f0;
}
#driveFileListContainer.view-list .file-icon {
    width: 24px;
    height: 24px;
    margin-right: 15px;
    flex-shrink: 0;
}
#driveFileListContainer.view-list .file-name {
    flex-grow: 1; 
    font-size: 15px; 
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; 
}
#driveFileListContainer.view-list .file-modified-time {
    font-size: 12px;
    color: #888;
    margin-left: 15px;
    flex-shrink: 0;
}


/* --- グリッド表示用のスタイル --- */
#driveFileListContainer.view-grid ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    padding: 20px 0;
}

/*アイテムの形だと思う*/
#driveFileListContainer.view-grid .drive-file-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 15px 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    word-break: break-all;
    transition: all 0.2s ease; 
}
#driveFileListContainer.view-grid .drive-file-item:hover {
    background-color: #f0f0f0;
    border-color: #007bff;
    transform: translateY(-2px); 
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
#driveFileListContainer.view-grid .file-icon {
    width: 48px; 
    height: 48px;
    margin-bottom: 10px;
}
#driveFileListContainer.view-grid .file-name {
    font-size: 13px; 
    color: #333;
    font-weight: 600;
    line-height: 1.4;
    height: 34px; 
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
#driveFileListContainer.view-grid .file-modified-time {
    font-size: 11px;
    color: #888;
    margin-top: 8px;
}

/* 読み込みモーダル */
#loadModalOverlay {
  display: none;      
  position: fixed;    
  top: 0;             
  left: 0;            
  width: 100%;         
  height: 100%;        
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
}

#loadModalOverlay .modal-content {
  max-width: 80vw; 
  width: 90%;     
  z-index: 2000;
}

/* モバイル表示など、特に画面幅が狭い場合への配慮 */
@media (min-width: 900px) {
  #loadModalOverlay .modal-content {
    max-width: 860px; 
  }
}




/* --- 右クリックメニュー --- */
.context-menu {
  display: none;
  position: absolute; 
  z-index: 3000; 
  
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-width: 180px; 
  padding: 5px 0; 
}

.context-menu-list {
  list-style: none; 
  margin: 0;
  padding: 0;
}

.context-menu-item {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  font-size: 14px;
  color: #333;
  transition: background-color 0.15s ease; 
}

/* マウスが乗った時のスタイル */
.context-menu-item:hover {
  background-color: #f5f5f5;
}

.context-menu-icon {
  margin-right: 10px;
  width: 20px; 
  text-align: center;
}

.loading-overlay {
  display: none; 
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 9999; 

  /* 中身を中央に配置するための設定 */
  
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(255, 255, 255, 0.3); 
  border-top: 5px solid #fff; 
  border-radius: 50%;
  animation: spin 1s linear infinite; 
}

.loading-text {
  color: white;
  margin-top: 20px;
  font-size: 16px;
}

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


.no-select {
  user-select: none;
}


