/* Integrated CSS with Machikane-kun Palette */

/* === Machikane-kun Color Palette === */
html.member-theme {
    --main-color:   #66BB6A;  /* マチカネくん体色 */
    --accent-color: #FFEB3B;  /* 腹部イエロー */
    --bg-color:     #F1F8E9;  /* 淡いグリーン */
    --text-color:   #333333;  /* ダークグレー */
  }
  
  /* ── 管理者用テーマ（html.management-theme） ── */
html.management-theme {
    /* メインカラーはそのまま使うため背景色だけ淡くする */
    --main-color:   #171C61;
    --accent-color: #FFFFFF;
    --bg-color:     #D1D2DF;
    --text-color:   #333333;
  }

  /* 全体背景 */
  body,
  #app-container {
    background-color: var(--bg-color) !important;
    color: var(--text-color);
  }
  
  /* ユーザー定義カラー適用 */
  
  /* ヘッダー・フッター・UIコンポーネントの背景置換 */
  /* === Integrated main.css === */
  
  /* --- From main.css --- */
  /* ------------------------------------------------------------------ */
  
  .container {
      padding: 10px;
  }
   
  /* ------------------------------------------------------------------ */
  
  .custom-header {
      position: fixed;
      top: 0px;
      left: 0px;
      width: 100%;
      display: flex;
      height: 80px !important;	
      justify-content: center;
      align-items: center;
      height: 80px;
      background: var(--main-color) !important;
      color: #fff;
      text-align: center;
      font-family: Arial, sans-serif;
      z-index: 1000;
  }
  .custom-header .nav-link {
      color: #fff;
      font-size: 18px;
      margin: 0 15px;
      transition: color 0.3s ease-in-out;
  }
  .custom-header .nav-link:hover {
      color: #d1c4e9; /* ホバー時に少し薄くする */
  }
  .custom-header h1 {
      font-size: 24px;
      margin: 0;
  }
  
  .custom-header .nav-link.active
  {
      background-color: rgba(255, 255, 255, 0.2);
      border-radius: 4px;
      padding: 6px 10px;
      font-weight: bold;
      text-decoration: none;
      color: #fff; /* テキストは白を維持 */
      border: 2px solid #fff; 
  }
  
  /* ヘッダのナビゲーションリンク内の日本語と英語テキストを上下表示 */
  .nav-link .menu-ja,
  .nav-link .menu-en {
    display: block;
    text-align: center;
    line-height: 1.2;
  }
  
  /* 英語文言は少し小さめにする例 */
  .nav-link .menu-en {
    font-size: 0.85em;
    color: #ccc;
  }
  
  /* ヘッダ全体のメニュー項目のパディングなど調整例 */
  .nav-link {
    padding: 8px 12px;
    text-decoration: none;
  }
  
  /* ------------------------------------------------------------------ */
  
  #extpage-main {
      margin-top: 80px;
  }
  
  /* ------------------------------------------------------------------ */
  
  .footer {
      position: fixed;
      bottom: 0px;
      left: 0px;
      width: 100%;
      display: flex;
      justify-content: center;
      align-items: center;
      height: 40px;
      background: var(--main-color) !important;
      color: #fff;
      text-align: center;
      font-family: Arial, sans-serif;
      font-size: 16px;
      border-top: 3px solid #fff;
  }
  
  .footer p {
      margin: 0;
      padding: 0;
      font-weight: bold;
  }
  
  .footer .footer-nav {
      margin-left: 20px;
  }
  
  .footer .footer-nav a {
      color: #fff;
      font-size: 18px;
      margin: 0 15px;
      transition: color 0.3s ease-in-out;
      text-decoration: none;
  }
  
  .footer .footer-nav a:hover {
      color: #d1c4e9; /* ホバー時に少し薄くする */
  }
  
  .footer .footer-nav a.active {
      background-color: rgba(255, 255, 255, 0.2);
      border-radius: 4px;
      padding: 6px 10px;
      font-weight: bold;
      text-decoration: none;
      border: 2px solid #fff;
  }
  
  .hamburger {
      display: none;
      flex-direction: column;
      cursor: pointer;
      gap: 5px;
      margin-left: auto;
  }
  
  .hamburger span {
      height: 3px;
      width: 25px;
      background: white;
      border-radius: 3px;
  }
  
  @media (max-width: 768px) {
      header .nav {
          display: none;
          position: absolute;
          top: 80px;
          right: 0;
          background: var(--main-color) !important;
          width: 100%;
          flex-direction: column;
          padding: 10px 0;
      }
  
      header .nav.show {
          display: flex;
      }
  
      header .hamburger {
          display: flex;
      }
  }
  
  /* パンくずリスト用のスタイル */
  .breadcrumb-nav {
      margin-bottom: 15px;
  }
  
  /* 概要テキストを2行で省略する */
  .summary {
      display: -webkit-box;
      -webkit-line-clamp: 2;  /* 表示行数 */
      -webkit-box-orient: vertical;
      overflow: hidden;
      text-overflow: ellipsis;
    }
  
    .all-check {
      display: flex;
      justify-content: end;
  }
  /* テーブル内の編集ボタン */
  #app-container #download-attachment-all-file {
      background-color: #2196F3; /* 青色: 編集 */
      color: white;
      padding: 5px 10px;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      font-size: 14px;
  }
  
  #app-container #download-attachment-all-file:hover {
      background-color: #1976D2; /* ホバー時の濃い青色 */
  }
  
  #app-container #download-submit-all-file {
      background-color: #2196F3; /* 青色: 編集 */
      color: white;
      /* padding: 5px 10px; */
      padding: 10px 22px;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      font-size: 14px;
      width: 280px;
  }
  
  #app-container #download-submit-all-file:hover {
      background-color: #1976D2; /* ホバー時の濃い青色 */
  }
  
  /* 一括削除ボタン用スタイル */
  #delete-submit-all-file,
  #delete-attachment-all-file {
      background-color: #d32f2f; /* 赤系：削除を示唆 */
      color: white;
      padding: 5px 10px;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      font-size: 14px;
      margin-left: 5px;
      transition: background-color 0.3s;
  }
  
  #delete-submit-all-file:hover,
  #delete-attachment-all-file:hover {
      background-color: #b71c1c; /* ホバー時、より濃い赤 */
  }
  
  .file-checkbox-container {
      padding: 10px 10px;
  }
  
  .attachment-file-checkbox {
      transform: scale(1.5);
      width: auto !important;
      margin: 0px !important;
  }
  .submit-file-checkbox {
      transform: scale(1.5);
      width: auto !important;
      margin: 0px !important;
  }
  
  .attachment-icon-cherckbox {
      margin-left: auto !important;
  }
  
  .submit-icon-cherckbox {
      margin-left: auto !important;
  }
  
  .sort-button {
      cursor: pointer;
  }
  .sorted-asc {
      padding: 10px 15px;
      font-size: 14px;
      border: none;
      border-radius: 4px;
  }
  
  .sorted-asc::after {
      content: "\f35b";  /* 昇順を示すアイコン */
      font-family: "Font Awesome 5 Free";
  }
  
  .sorted-desc::after {
      content: "\f0ab";  /* 降順を示すアイコン */
      font-family: "Font Awesome 5 Free";
  }
  
  /* コンテキストメニュー用 */
  .file-context-menu {
      position: absolute;
      z-index: 2000;
      background: #fff;
      border: 1px solid #ccc;
      padding: 5px 0;
      border-radius: 4px;
      box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    }
    .file-context-menu ul {
      list-style: none;
      margin: 0;
      padding: 0;
    }
    .file-context-menu ul li {
      padding: 6px 12px;
      cursor: pointer;
    }
    .file-context-menu ul li:hover {
      background-color: #eee;
    }
    
  /* ダウンロードオーバーレイ用スタイル */
  #download-overlay {
      display: none; /* 初期は非表示 */
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.5);
      z-index: 9999;
      color: #fff;
      font-size: 24px;
      text-align: center;
      padding-top: 20%; /* 中央寄せのため */
  }
  
  .event-info-table {
      width: 100%;
      border-collapse: collapse;
      margin: 10px 0;
      font-family: Arial, sans-serif;
    }
    
    .event-info-table th,
    .event-info-table td {
      padding: 8px 12px;
      border-bottom: 1px solid #ddd;
    }
    
    .event-info-table th {
      text-align: left;
      background-color: #f9f9f9;
      font-weight: bold;
      width: 150px;
    }
    
    .event-info-table tr:last-child th,
    .event-info-table tr:last-child td {
      border-bottom: none;
    }
    
    #copy-login-url {
      background: #ffffff22;
      border: 1px solid #fff;
      color: #fff;
      font-size: 14px;
      padding: 4px 10px;
      border-radius: 5px;
      cursor: pointer;
    }
    #copy-login-url:hover {
      background: #ffffff44;
    }
    
  /* ------------------------------------------------------------------ */
  /* ヘッダーのユーザー情報表示 */
  .header-user-info {
      display: flex;
      align-items: center;
      color: #fff;
    }
    .header-user-info i {
      font-size: 24px;
      margin-right: 8px;
    }
    .header-user-info .user-text {
      line-height: 1.2;
    }
    .header-user-info .user-text .user-name,
    .header-user-info .user-text .user-number {
      display: block;
    }
    @media (max-width: 768px) {
      .header-user-info {
        font-size: 14px;
      }
      .header-user-info i {
        font-size: 20px;
      }
    }
    /* ------------------------------------------------------------------ */
    
    /* 提出ファイル一覧タブ内の提出ボタンを右寄せ */
  #submitted-files .submit-button-container {
      display: flex;
      justify-content: flex-end;
      margin: 1.5rem 0;
  }
  
  /* --- From 67921decd5f353506275201 --- */
  #app-container {
      font-family: Arial, sans-serif;
      background-color: #f9f9f9;
      padding: 20px;
  }
  
  #app-container .container {
      margin: 0 auto;
      background-color: #fff;
      border-radius: 8px;
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
      padding: 20px;
  }
  
  #app-container .form-title {
      text-align: center;
      font-size: 2rem;
      color: white;
      padding: 20px;
      margin-bottom: 20px;
      background: var(--main-color) !important;
      border-radius: 8px;
  }
  
  #app-container .form-group {
      margin-bottom: 15px;
      position: relative;
  }
  
  #app-container label {
      display: block;
      margin-bottom: 5px;
      font-weight: bold;
  }
  
  #app-container input,
  #app-container textarea,
  #app-container select {
      width: 100%;
      padding: 10px;
      border: 1px solid #ccc;
      border-radius: 4px;
      margin-bottom: 10px;
  }
  
  #app-container .remove-form-group {
      background-color: #f44336;
      color: white;
      border: none;
      border-radius: 4px;
      padding: 5px 10px;
      cursor: pointer;
  }
  
  /* エントリーフォームリスト */
  #app-container #form-list-table {
      width: 100%;
      border-collapse: collapse;
  }
  
  #app-container #form-list-table th,
  #app-container #form-list-table td {
      padding: 10px;
      border: 1px solid #ccc;
      text-align: left;
  }
  
  #app-container #form-list-table th {
      background-color: #f2f2f2;
  }
  
  #app-container .remove-form-group:hover {
      background-color: #d32f2f;
  }
  
  #app-container .dynamic-item {
      margin-bottom: 15px;
  }
  
  #app-container .dynamic-label,
  #app-container .dynamic-type {
      margin-bottom: 10px;
  }
  
  /* タブナビゲーション */
  #app-container .tab-navigation {
      display: flex;
      margin-bottom: 15px;
      list-style: none;
      padding: 0;
      border-bottom: 2px solid #ccc;
  }
  
  #app-container .tab-item {
      padding: 10px 20px;
      cursor: pointer;
      border: 1px solid #ccc;
      border-bottom: none;
      background: #f9f9f9;
  }
  
  #app-container .tab-item.active {
      background: #fff;
      font-weight: bold;
      color: #333;
  }
  
  #app-container .tab-pane {
      display: none;
      padding: 15px;
      background: #fff;
      border: 1px solid #ccc;
  }
  
  #app-container .tab-pane.active {
      display: block;
  }
  
  /* テーブルスタイル */
  #app-container #student-table {
      width: 100%;
      border-collapse: collapse;
      margin-top: 10px;
  }
  
  #app-container #student-table th,
  #app-container #student-table td {
      padding: 10px;
      border: 1px solid #ccc;
      text-align: left;
  }
  
  #app-container #student-table th {
      background-color: #f2f2f2;
  }
  
  /* ポップアップモーダル */
  #app-container .modal-overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.5);
      display: flex;
      justify-content: center;
      align-items: center;
      z-index: 1000;
  }
  
  #app-container .modal-content {
      background: #fff;
      padding: 20px;
      border-radius: 8px;
      /* max-width: 800px; */
      max-height: 90%; /* モーダルの高さを90%に制限 */
      overflow-y: auto; /* モーダル内でスクロール可能にする */
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  }
  
  #app-container .form-group {
      margin-bottom: 15px;
  }
  
  #app-container .form-group label {
      display: block;
      margin-bottom: 5px;
      font-weight: bold;
  }
  
  #app-container .form-group input,
  #app-container .form-group select,
  #app-container .form-group textarea {
      width: 100%;
      padding: 8px;
      border: 1px solid #ccc;
      border-radius: 4px;
  }
  
  #app-container button.remove-field {
      margin-top: 10px;
      color: white;
      background-color: #f44336;
      border: none;
      padding: 5px 10px;
      border-radius: 4px;
      cursor: pointer;
  }
  
  #app-container button.remove-field:hover {
      background-color: #d32f2f;
  }
  
  #app-container .modal-buttons {
      display: flex;
      justify-content: space-between;
      margin-top: 20px;
  }
  
  #app-container .modal-buttons button {
      padding: 10px 20px;
      border: none;
      border-radius: 4px;
      cursor: pointer;
  }
  
  #save-event {
      background-color: #4CAF50;
      color: white;
  }
  
  #app-container #close-modal {
      background-color: #f44336;
      color: white;
  }
  /* テーブルスタイル */
  #app-container #event-list-table {
      width: 100%;
      border-collapse: collapse;
      margin-top: 20px;
      font-size: 14px;
  }
  
  #app-container #event-list-table th {
      background-color: #d1d1d1;
      color: #333;
      text-align: left;
      padding: 12px 10px;
      border-bottom: 2px solid #ddd;
  }
  
  #app-container #event-list-table td {
      padding: 10px;
      border-bottom: 1px solid #ddd;
  }
  
  #app-container #event-list-table tr:hover {
      background-color: #f9f9f9;
  }
  
  /* ボタンスタイル */
  #app-container button {
      padding: 10px 15px;
      font-size: 14px;
      border: none;
      border-radius: 4px;
      cursor: pointer;
  }
  
  #app-container button:hover {
      opacity: 0.9;
  }
  
  #app-container #save-event {
      background-color: #4CAF50; /* 緑色: 保存 */
      color: white;
  }
  
  #app-container #close-modal {
      background-color: #9e9e9e; /* グレー: キャンセル */
      color: white;
  }
  
  #app-container .delete-event {
      background-color: #f44336; /* 赤色: 削除 */
      color: white;
  }
  
  /* モーダルスタイル */
  #app-container .modal-content h2 {
      font-size: 1.5em;
      margin-bottom: 20px;
      color: #333;
  }
  
  #app-container .modal-buttons {
      display: flex;
      justify-content: space-between;
      gap: 10px;
  }
  
  #app-container .modal-buttons button {
      width: calc(50% - 5px);
  }
  
  /* タブナビゲーション */
  #app-container .tab-navigation {
      display: flex;
      margin-bottom: 15px;
      list-style: none;
      padding: 0;
      border-bottom: 2px solid #ccc;
  }
  
  #app-container .tab-item {
      padding: 10px 20px;
      cursor: pointer;
      border: 1px solid #ccc;
      border-bottom: none;
      background: #f9f9f9;
  }
  
  #app-container .tab-item.active {
      background: #fff;
      font-weight: bold;
      border-color: var(--main-color);
      color: #333;
  }
  
  /* テーブル内の編集ボタン */
  #app-container #add-new-event {
      background-color: #2196F3; /* 青色: 編集 */
      color: white;
      padding: 5px 10px;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      font-size: 14px;
  }
  
  /* テーブル内の編集ボタン */
  #app-container .back-button {
      background-color: #939393;
      color: white;
      padding: 5px 10px;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      font-size: 14px;
  }
  
  #app-container #add-new-event:hover {
      background-color: #1976D2; /* ホバー時の濃い青色 */
  }
  
  /* テーブル内の編集ボタン */
  #app-container .add-new-event-group {
      background-color: #2196F3; /* 青色: 編集 */
      color: white;
      padding: 5px 10px;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      font-size: 14px;
  }
  
  #app-container .add-new-event-group:hover {
      background-color: #1976D2; /* ホバー時の濃い青色 */
  }
  
  /* テーブル内の編集ボタン */
  #app-container #add-attachment-file {
      background-color: #2196F3; /* 青色: 編集 */
      color: white;
      padding: 5px 10px;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      font-size: 14px;
  }
  
  #app-container #add-attachment-file:hover {
      background-color: #1976D2; /* ホバー時の濃い青色 */
  }
  
  /* テーブル内の編集ボタン */
  #app-container .edit-event {
      background-color: #2196F3; /* 青色: 編集 */
      color: white;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      font-size: 14px;
  }
  
  #app-container .edit-event:hover {
      background-color: #1976D2; /* ホバー時の濃い青色 */
  }
  
  /* テーブル内の編集ボタン */
  #app-container .view-attachment-file {
      background-color: #2196F3; /* 青色: 編集 */
      color: white;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      font-size: 14px;
  }
  
  #app-container .view-attachment-file:hover {
      background-color: #1976D2; /* ホバー時の濃い青色 */
  }
  
  /* 項目追加ボタン */
  #app-container #add-field {
      background-color: #FFC107; /* 黄色: 項目追加 */
      color: #333;
      padding: 8px 15px;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      font-size: 14px;
      margin-bottom: 15px;
  }
  
  #app-container #add-field:hover {
      background-color: #FFB300; /* ホバー時の濃い黄色 */
  }
  
  /* エントリーフォームリスト */
  #app-container #submission-status-table {
      width: 100%;
      border-collapse: collapse;
  }
  
  #app-container #submission-status-table th,
  #app-container #submission-status-table td {
      padding: 10px;
      border: 1px solid #ccc;
      text-align: left;
  }
  
  #app-container #submission-status-table th {
      background-color: #f2f2f2;
  }
  
  /* アイコンボタンのスタイル */
  .icon-button {
      background: none;
      border: none;
      color: #333;
      font-size: 1rem;
      cursor: pointer;
      transition: color 0.3s ease;
      display: inline-flex;
      align-items: center;
      gap: 5px;
  }
  
  .icon-button i {
      font-size: 1.2rem;
  }
  
  .icon-button:hover {
      color: #1168cb;
  }
  
  .icon-button:focus {
      outline: none;
      color: #4CAF50;
  }
  
  /* テーブル内アイコンボタン */
  #event-list-table .icon-button {
      margin: 0 5px;
  }
  
  #form-download-permission {
      width: 5% !important;
      transform: scale(2.0);
  }
  
  /* モーダル全体のスタイル */
  #popup-modal {
      overflow-y: auto; /* 内容が多い場合はスクロールを表示 */
  }
  
  /* モーダルのオーバーレイ */
  .modal-overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.5);
      display: flex;
      justify-content: center;
      align-items: center;
      z-index: 1000;
  }
  
  /* フォームのスタイル */
  .popup-form {
      padding: 20px;
      max-height: calc(100vh - 150px); /* フォームの最大高さを調整 */
      overflow-y: auto; /* フォーム内容が多い場合にスクロール可能 */
  }
  
  /* 各フォームグループ */
  .popup-form .form-group {
      margin-bottom: 20px;
  }
  
  /* ラベル */
  .popup-form .form-group label {
      display: block;
      font-weight: bold;
      margin-bottom: 5px;
      color: #333;
  }
  
  /* 入力フィールド */
  .popup-form .form-group input,
  .popup-form .form-group textarea {
      width: 100%;
      padding: 10px;
      font-size: 16px;
      border: 2px solid #ccc;
      border-radius: 5px;
      background-color: #f9f9f9;
      transition: border-color 0.3s ease;
  }
  
  /* フォーカス時 */
  .popup-form .form-group input:focus,
  .popup-form .form-group textarea:focus {
      border-color: var(--main-color);
      outline: none;
      background-color: #ffffff;
  }
  
  /* テキストエリアの高さ */
  .popup-form .form-group textarea {
      min-height: 100px;
      resize: vertical;
  }
  
  /* ボタンのスタイル */
  .modal-buttons {
      display: flex;
      justify-content: space-between;
      margin-top: 20px;
  }
  
  /* アイコンボタンのスタイル */
  .modal-buttons .icon-button {
      display: inline-flex;
      align-items: center;
      padding: 10px 20px;
      font-size: 1rem;
      color: #ffffff;
      background-color: var(--main-color);
      border: none;
      border-radius: 5px;
      cursor: pointer;
      transition: background-color 0.3s ease, transform 0.2s ease;
  }
  
  .modal-buttons .icon-button:hover {
      background-color: var(--main-color);
      transform: scale(1.05);
  }
  
  .modal-buttons .icon-button:active {
      transform: scale(1);
  }
  
  .modal-buttons .icon-button.close-modal {
      background-color: #939393;
  }
  
  .modal-buttons .icon-button.close-modal:hover {
      background-color: #727272;
  }
  
  
  /* ドラッグアンドドロップゾーン */
  .drop-zone {
      width: 100%;
      height: 150px;
      border: 2px dashed #ccc;
      border-radius: 8px;
      background-color: #f9f9f9;
      text-align: center;
      padding: 20px;
      box-sizing: border-box;
      color: #888;
      font-size: 16px;
      transition: background-color 0.3s, border-color 0.3s;
    }
    
    .drop-zone p {
      margin: 0;
      font-weight: bold;
    }
    
    .drop-zone.drag-over {
      background-color: #e0f7fa;
      border-color: #00bcd4;
      color: #333;
    }
    
    /* ファイルリストのゾーン */
    #file-count-zone {
      margin-top: 20px;
    }
  
    #file-list-zone {
      padding: 10px;
      max-height: 300px; /* 最大の高さを設定 */
      overflow-y: auto; /* リストが長くなったらスクロール */
      border: 1px solid #ddd;
      border-radius: 8px;
      background-color: #fafafa;
    }
    
    #file-list-zone ul {
      margin: 0;
      padding: 0;
      list-style-type: none;
    }
    
    #file-list-zone li {
      padding: 8px;
      font-size: 14px;
      color: #555;
      border-bottom: 1px solid #eee;
    }
    
    #file-list-zone li:last-child {
      border-bottom: none;
    }
    
    #upload-file {
      background-color: #4CAF50;
      color: white;
  }
  
  /* ファイルアップロード */
  #file-upload-modal .file-table {
      width: 100%;
      border-collapse: collapse;
      margin-top: 10px;
  }
  
  #file-upload-modal .file-table th, .file-table td {
      border: 1px solid #ddd;
      padding: 8px;
      text-align: center;
  }
  
  #file-upload-modal .file-table th {
      background-color: #d1d1d1;
  }
  
  #file-upload-modal .remove-file {
      background: none;
      color: red;
      font-size: 16px;
      border: none;
      cursor: pointer;
  }
  
  #file-upload-modal .remove-file:hover {
      color: darkred;
  }
  
  #file-upload-modal .progress-container {
      width: 100%;
      text-align: center;
      margin-top: 5px;
  }
  
  #file-upload-modal progress {
      width: 90%;
      height: 8px;
  }
  
  #file-upload-modal .upload-success {
      color: green;
      margin-left: 10px;
  }
  
  #file-upload-modal .upload-failed {
      color: red;
      margin-left: 10px;
  }
  
  .disabled-button {
      background-color: #ccc !important;
      color: #666 !important;
      cursor: not-allowed !important;
  }
  
  /* ファイルアイコンコンテナ */
  #attachment-file-icon-container {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); /* 120px 幅で自動調整 */
      gap: 10px; /* アイコン間の余白 */
      padding: 10px;
      justify-content: center;
  }
  
  /* ファイルアイコンのデザイン */
  #attachment-file-icon-container .file {
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      padding: 10px;
      border-radius: 8px;
      background-color: #f9f9f9;
      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
      transition: transform 0.2s, box-shadow 0.2s;
      cursor: pointer;
  }
  
  #attachment-file-icon-container .file:hover {
      transform: scale(1.05);
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  }
  
  /* ファイルアイコン */
  #attachment-file-icon-container .file img {
      width: 48px; /* アイコンサイズ */
      height: 48px;
      object-fit: contain;
      margin-bottom: 5px;
  }
  
  /* ファイル名 */
  #attachment-file-icon-container .file-name {
      font-size: 12px;
      font-weight: 500;
      max-width: 100%;
      word-wrap: break-word; /* 長いファイル名を折り返す */
      white-space: normal;
      overflow-wrap: break-word;
      padding: 5px;
  }
  
  /* ファイルリストのテーブル */
  #attachment-file-list-body {
      width: 100%;
      border-collapse: collapse;
  }
  
  #attachment-file-list-body td {
      padding: 8px;
      border-bottom: 1px solid #ddd;
      text-align: left;
      font-size: 14px;
      word-wrap: break-word; /* 長いファイル名を折り返す */
      white-space: normal;
      overflow-wrap: break-word;
  }
  
  /* テーブルスタイル */
  #app-container #attachment-file-list-table {
      width: 100%;
      border-collapse: collapse;
      margin-top: 20px;
      font-size: 14px;
  }
  
  #app-container #attachment-file-list-table th {
      background-color: #d1d1d1;
      color: #333;
      text-align: left;
      padding: 12px 10px;
      border-bottom: 2px solid #ddd;
  }
  
  #app-container #attachment-file-list-table td {
      padding: 10px;
      border-bottom: 1px solid #ddd;
  }
  
  #app-container #attachment-file-list-table tr:hover {
      background-color: #f9f9f9;
  }
  /* ファイルアップロード */
  
  /* ファイル提出*/
  /* ファイルアイコンコンテナ */
  #submit-file-icon-container {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); /* 120px 幅で自動調整 */
      gap: 10px; /* アイコン間の余白 */
      padding: 10px;
      justify-content: center;
  }
  
  /* ファイルアイコンのデザイン */
  #submit-file-icon-container .file {
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      padding: 10px;
      border-radius: 8px;
      background-color: #f9f9f9;
      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
      transition: transform 0.2s, box-shadow 0.2s;
      cursor: pointer;
  }
  
  #submit-file-icon-container .file:hover {
      transform: scale(1.05);
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  }
  
  /* ファイルアイコン */
  #submit-file-icon-container .file img {
      width: 48px; /* アイコンサイズ */
      height: 48px;
      object-fit: contain;
      margin-bottom: 5px;
  }
  
  /* ファイル名 */
  #submit-file-icon-container .file-name {
      font-size: 12px;
      font-weight: 500;
      max-width: 100%;
      word-wrap: break-word; /* 長いファイル名を折り返す */
      white-space: normal;
      overflow-wrap: break-word;
      padding: 5px;
  }
  
  /* ファイルリストのテーブル */
  #submit-file-list-body {
      width: 100%;
      border-collapse: collapse;
  }
  
  #submit-file-list-body td {
      padding: 8px;
      border-bottom: 1px solid #ddd;
      text-align: left;
      font-size: 14px;
      word-wrap: break-word; /* 長いファイル名を折り返す */
      white-space: normal;
      overflow-wrap: break-word;
  }
  
  /* テーブルスタイル */
  #app-container #submit-file-list-table {
      width: 100%;
      border-collapse: collapse;
      margin-top: 20px;
      font-size: 14px;
  }
  
  #app-container #submit-file-list-table th {
      background-color: #d1d1d1;
      color: #333;
      text-align: left;
      padding: 12px 10px;
      border-bottom: 2px solid #ddd;
  }
  
  #app-container #submit-file-list-table td {
      padding: 10px;
      border-bottom: 1px solid #ddd;
  }
  
  #app-container #submit-file-list-table tr:hover {
      background-color: #f9f9f9;
  }
  /* ファイル提出 */
  
  /* カスタム右クリックメニュー */
  #attachment-context-menu {
      position: absolute;
      background: white;
      border: 1px solid #ccc;
      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
      border-radius: 5px;
      padding: 5px;
      z-index: 1000;
  }
  
  #attachment-context-menu ul {
      list-style: none;
      margin: 0;
      padding: 0;
  }
  
  #attachment-context-menu li {
      padding: 8px 15px;
      cursor: pointer;
      font-size: 14px;
  }
  
  #attachment-context-menu li:hover {
      background: #f0f0f0;
  }
  
  #submit-context-menu {
      position: absolute;
      background: white;
      border: 1px solid #ccc;
      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
      border-radius: 5px;
      padding: 5px;
      z-index: 1000;
  }
  
  #submit-context-menu ul {
      list-style: none;
      margin: 0;
      padding: 0;
  }
  
  #submit-context-menu li {
      padding: 8px 15px;
      cursor: pointer;
      font-size: 14px;
  }
  
  #submit-context-menu li:hover {
      background: #f0f0f0;
  }
  
  #event-group-context-menu {
      position: absolute;
      background: white;
      border: 1px solid #ccc;
      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
      border-radius: 5px;
      padding: 5px;
      z-index: 1000;
  }
  
  #event-group-context-menu ul {
      list-style: none;
      margin: 0;
      padding: 0;
  }
  
  #event-group-context-menu li {
      padding: 8px 15px;
      cursor: pointer;
      font-size: 14px;
  }
  
  #event-group-context-menu li:hover {
      background: #f0f0f0;
  }
  
  #event-context-menu {
      position: absolute;
      background: white;
      border: 1px solid #ccc;
      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
      border-radius: 5px;
      padding: 5px;
      z-index: 1000;
  }
  
  #event-context-menu ul {
      list-style: none;
      margin: 0;
      padding: 0;
  }
  
  #event-context-menu li {
      padding: 8px 15px;
      cursor: pointer;
      font-size: 14px;
  }
  
  #event-context-menu li:hover {
      background: #f0f0f0;
  }
  
  /* ビューアーモーダル */
  #viewer-modal {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.8);
      display: flex;
      justify-content: center;
      align-items: center;
      z-index: 1000;
  }
  
  /* 背景クリックで閉じる */
  #viewer-overlay {
      position: absolute;
      width: 100%;
      height: 100%;
  }
  
  /* モーダルコンテンツ */
  #viewer-content {
      position: relative;
      background: white;
      padding: 15px;
      border-radius: 8px;
      max-width: 90vw;  /* 画面幅の90%以内 */
      max-height: 90vh; /* 画面高の90%以内 */
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
  }
  
  /* 閉じるボタン */
  #viewer-close {
      position: absolute;
      top: -15px;
      right: -15px;
      width: 30px;
      height: 30px;
      font-size: 24px;
      font-weight: bold;
      text-align: center;
      line-height: 30px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.8);
      color: #333;
      cursor: pointer;
      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
      transition: background 0.2s ease-in-out;
  }
  
  #viewer-close:hover {
      background: rgba(255, 255, 255, 1);
  }
  
  /* コンテンツエリア */
  #viewer-body {
      width: 95%;
      height: 95%;
      display: flex;
      justify-content: center;
      align-items: center;
  }
  
  /* 画像 & 動画のスタイル */
  #viewer-body img, #viewer-body video {
      max-width: 90%; /* モーダル内に収まるように調整 */
      max-height: 90%; /* モーダル内に収まるように調整 */
      object-fit: contain; /* 縦横比を維持して縮小 */
  }
  
  .all-check {
      display: flex;
      justify-content: end;
  }
  /* テーブル内の編集ボタン */
  #app-container #download-attachment-all-file {
      background-color: #2196F3; /* 青色: 編集 */
      color: white;
      padding: 5px 10px;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      font-size: 14px;
  }
  
  #app-container #download-attachment-all-file:hover {
      background-color: #1976D2; /* ホバー時の濃い青色 */
  }
  
  .attachment-file-checkbox {
      transform: scale(1.5);
      width: auto !important;
      margin: 0px !important;
  }
  .submit-file-checkbox {
      transform: scale(1.5);
      width: auto !important;
      margin: 0px !important;
  }
  
  .attachment-icon-cherckbox {
      margin-left: auto !important;
  }
  
  .submit-icon-cherckbox {
      margin-left: auto !important;
  }
  
  .sort-button {
      cursor: pointer;
  }
  .sorted-asc {
      padding: 10px 15px;
      font-size: 14px;
      border: none;
      border-radius: 4px;
  }
  
  .sorted-asc::after {
      content: "\f35b";  /* 昇順を示すアイコン */
      font-family: "Font Awesome 5 Free";
  }
  
  .sorted-desc::after {
      content: "\f0ab";  /* 降順を示すアイコン */
      font-family: "Font Awesome 5 Free";
  }
  
  /* --- From 67921decd123d241236489b --- */
  #app-container {
      background-color: #f0f4f8;
      padding: 10px;
      /* display: flex; */
      justify-content: center;
      align-items: center;
      min-height: 100vh;
  }
  
  #app-container .container {
      width: 100%;
      max-width: 800px;
      background: #ffffff;
      border-radius: 10px;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
      /* padding: 30px; */
  }
  
  /* Title styles */
  #app-container .form-title {
      text-align: center;
      font-size: 2rem;
      font-weight: bold;
      color: #ffffff;
      background: var(--main-color) !important;
      padding: 15px 20px;
      border-radius: 8px;
      margin-bottom: 30px;
      text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.2);
  }
  
  /* Dropdown styles */
  #app-container #entry-select {
      width: 100%;
      padding: 10px;
      font-size: 16px;
      margin-bottom: 20px;
      border: 2px solid #ccc;
      border-radius: 5px;
      background-color: #f9f9f9;
      transition: border-color 0.3s ease;
  }
  
  #app-container #entry-select:focus {
      border-color: var(--main-color);
      outline: none;
      background-color: #ffffff;
  }
  
  /* Entry details styles */
  #app-container #entry-details {
      background-color: #ffffff;
      border: 2px solid var(--main-color);
      padding: 20px;
      border-radius: 10px;
      margin-bottom: 30px;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  }
  
  #app-container #entry-details .entry-title {
      font-size: 1.8rem;
      font-weight: bold;
      color: #333;
      margin-bottom: 20px;
      text-align: center;
  }
  
  #app-container #entry-details .entry-description {
      padding: 15px;
      border: 1px solid #ddd;
      border-radius: 8px;
      background-color: #f9f9f9;
      color: #555;
      font-size: 1rem;
      margin-bottom: 20px;
      text-align: justify;
  }
  
  #app-container #entry-details .entry-period {
      display: flex;
      justify-content: space-between;
      align-items: center;
  }
  
  #app-container #entry-details .entry-period label {
      font-size: 1rem;
      font-weight: bold;
      color: #333;
  }
  
  #app-container #entry-details .entry-period span {
      font-size: 1rem;
      color: #555;
  }
  
  /* Field container styles */
  #app-container #entry-fields-container .form-group {
      margin-bottom: 20px;
  }
  
  #app-container #entry-fields-container .form-group label {
      display: block;
      font-weight: bold;
      margin-bottom: 5px;
      color: #333;
  }
  
  #app-container #entry-fields-container .entry-input,
  #app-container #entry-fields-container .entry-textarea {
      width: 100%;
      padding: 10px;
      font-size: 16px;
      border: 2px solid #ccc;
      border-radius: 5px;
      background-color: #f9f9f9;
      transition: border-color 0.3s ease;
  }
  
  #app-container #entry-fields-container .entry-input:focus,
  #app-container #entry-fields-container .entry-textarea:focus {
      border-color: var(--main-color);
      outline: none;
      background-color: #ffffff;
  }
  
  #app-container #entry-fields-container .entry-textarea {
      min-height: 100px;
      resize: vertical;
  }
  
  /* Save button styles */
  #app-container #save-entry {
      display: block;
      width: 100%;
      padding: 15px;
      font-size: 1.2rem;
      color: #fff;
      background-color: #4CAF50;
      border: none;
      border-radius: 5px;
      cursor: pointer;
      transition: background-color 0.3s ease, transform 0.2s ease;
  }
  
  #app-container #save-entry:hover {
      background-color: #45a049;
      transform: scale(1.05);
  }
  
  #app-container #save-entry:active {
      transform: scale(1);
  }
  
  /* タブのスタイル */
  #app-container .tabs {
      display: flex;
      margin-top: 20px;
      border-bottom: 2px solid #ccc;
      background-color: #f0f4f8;
      border-radius: 8px 8px 0 0;
      overflow: hidden;
  }
  
  #app-container .tab {
      flex: 1;
      padding: 15px 10px;
      text-align: center;
      cursor: pointer;
      border: 1px solid #ccc;
      border-bottom: none;
      background-color: #ffffff;
      font-size: 1rem;
      font-weight: bold;
      transition: background-color 0.3s ease, font-weight 0.3s ease;
  }
  
  #app-container .tab:hover {
      background-color: #ececec;
  }
  
  #app-container .tab.active {
      background-color: var(--main-color);
      color: #fff;
      border-bottom: 2px solid #ffffff;
      font-weight: bold;
  }
  
  /* タブコンテンツのスタイル */
  #app-container .tab-content {
      /* display: none; */
      padding: 20px;
      background-color: #ffffff;
      border: 2px solid var(--main-color);
      border-radius: 0 0 10px 10px;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
      animation: fadeIn 0.3s ease-in-out;
      margin: 2px;
  }
  
  #app-container .tab-content.active {
      display: block;
  }
  
  /* 添付コンテンツ一覧のスタイル */
  #app-container .content-list {
      list-style: none;
      padding: 0;
      margin: 0;
  }
  
  #app-container .content-list li {
      margin-bottom: 10px;
      font-size: 1rem;
      color: #333;
      background-color: #f9f9f9;
      padding: 15px;
      border: 1px solid #ddd;
      border-radius: 5px;
      transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  
  #app-container .content-list li:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  }
  
  /* アニメーション */
  @keyframes fadeIn {
      from {
          opacity: 0;
          transform: translateY(10px);
      }
      to {
          opacity: 1;
          transform: translateY(0);
      }
  }
  
  /* コンテンツ一覧テーブルのスタイル */
  #app-container .content-table {
      width: 100%;
      border-collapse: collapse;
      margin-top: 20px;
      background-color: #ffffff;
      border: 2px solid var(--main-color);
      border-radius: 8px;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  }
  
  #app-container .content-table thead {
      background: var(--main-color) !important;
      color: #ffffff;
      font-weight: bold;
      text-align: left;
  }
  
  #app-container .content-table thead th {
      padding: 10px;
      border-bottom: 2px solid var(--main-color);
  }
  
  #app-container .content-table tbody tr {
      transition: background-color 0.2s ease;
  }
  
  #app-container .content-table tbody tr:nth-child(odd) {
      background-color: #f9f9f9;
  }
  
  #app-container .content-table tbody tr:hover {
      background-color: #f1f4f9;
  }
  
  #app-container .content-table td {
      padding: 10px;
      border-bottom: 1px solid #ddd;
      font-size: 1rem;
      color: #333;
      text-align: left;
  }
  
  #app-container .content-table .download-button {
      padding: 5px 10px;
      font-size: 0.9rem;
      color: #ffffff;
      background-color: #4CAF50;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      transition: background-color 0.3s ease, transform 0.2s ease;
  }
  
  #app-container .content-table .download-button:hover {
      background-color: #45a049;
      transform: scale(1.05);
  }
  
  #app-container .content-table .download-button:active {
      transform: scale(1);
  }
  
  
  /* モーダル全体のスタイル */
  #popup-modal {
      overflow-y: auto; /* 内容が多い場合はスクロールを表示 */
  }
  
  /* モーダルのオーバーレイ */
  .modal-overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.5);
      display: flex;
      justify-content: center;
      align-items: center;
      z-index: 1000;
  }
  
  /* モーダルコンテンツ */
  .modal-content {
      background: #ffffff;
      border-radius: 10px;
      width: 90%;
      /* max-width: 600px; */
      max-height: 90vh; /* モーダルの最大高さを画面の90%に制限 */
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
      overflow-y: auto; /* コンテンツが長い場合にスクロールできるようにする */
      animation: fadeIn 0.3s ease-in-out;
  }
  
  /* モーダルヘッダー */
  .modal-content h2#modal-title {
      font-size: 1.8rem;
      font-weight: bold;
      color: #ffffff;
      background: var(--main-color) !important;
      padding: 15px 20px;
      margin: 0;
      border-radius: 10px 10px 0 0;
      text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.2);
      text-align: center;
  }
  
  /* フォームのスタイル */
  .popup-form {
      padding: 20px;
      max-height: calc(100vh - 150px); /* フォームの最大高さを調整 */
      overflow-y: auto; /* フォーム内容が多い場合にスクロール可能 */
  }
  
  /* 各フォームグループ */
  .popup-form .form-group {
      margin-bottom: 20px;
  }
  
  /* ラベル */
  .popup-form .form-group label {
      display: block;
      font-weight: bold;
      margin-bottom: 5px;
      color: #333;
  }
  
  /* 入力フィールド */
  .popup-form .form-group input,
  .popup-form .form-group textarea {
      width: 100%;
      padding: 10px;
      font-size: 16px;
      border: 2px solid #ccc;
      border-radius: 5px;
      background-color: #f9f9f9;
      transition: border-color 0.3s ease;
  }
  
  /* フォーカス時 */
  .popup-form .form-group input:focus,
  .popup-form .form-group textarea:focus {
      border-color: var(--main-color);
      outline: none;
      background-color: #ffffff;
  }
  
  /* テキストエリアの高さ */
  .popup-form .form-group textarea {
      min-height: 100px;
      resize: vertical;
  }
  
  /* ボタンのスタイル */
  .modal-buttons {
      display: flex;
      justify-content: space-between;
      margin-top: 20px;
  }
  
  /* アイコンボタンのスタイル */
  .modal-buttons .icon-button {
      display: inline-flex;
      align-items: center;
      padding: 10px 20px;
      font-size: 1rem;
      color: #ffffff;
      background-color: var(--main-color);
      border: none;
      border-radius: 5px;
      cursor: pointer;
      transition: background-color 0.3s ease, transform 0.2s ease;
  }
  
  /* テーブル内の編集ボタン */
  #app-container #submit-modal {
      background-color: #2196F3;
      color: white;
      /* padding: 5px 10px; */
      padding: 10px 110px;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      font-size: 14px;
      width: 280px;
  }
  
  /* テーブル内の編集ボタン */
  #app-container .back-button {
      background-color: #939393;
      color: white;
      padding: 5px 10px;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      font-size: 14px;
  }
  
  .modal-buttons .icon-button:hover {
      background-color: var(--main-color);
      transform: scale(1.05);
  }
  
  .modal-buttons .icon-button:active {
      transform: scale(1);
  }
  
  .modal-buttons .icon-button.close-modal {
      background-color: #939393;
  }
  
  .modal-buttons .icon-button.close-modal:hover {
      background-color: #727272;
  }
  
  /* ドラッグアンドドロップゾーン */
  .drop-zone {
      width: 100%;
      height: 150px;
      border: 2px dashed #ccc;
      border-radius: 8px;
      background-color: #f9f9f9;
      text-align: center;
      padding: 20px;
      box-sizing: border-box;
      color: #888;
      font-size: 16px;
      transition: background-color 0.3s, border-color 0.3s;
    }
    
    .drop-zone p {
      margin: 0;
      font-weight: bold;
    }
    
    .drop-zone.drag-over {
      background-color: #e0f7fa;
      border-color: #00bcd4;
      color: #333;
    }
    
    /* ファイルリストのゾーン */
    #file-count-zone {
      margin-top: 20px;
    }
  
    #file-list-zone {
      padding: 10px;
      max-height: 300px; /* 最大の高さを設定 */
      overflow-y: auto; /* リストが長くなったらスクロール */
      border: 1px solid #ddd;
      border-radius: 8px;
      background-color: #fafafa;
    }
    
    #file-list-zone ul {
      margin: 0;
      padding: 0;
      list-style-type: none;
    }
    
    #file-list-zone li {
      padding: 8px;
      font-size: 14px;
      color: #555;
      border-bottom: 1px solid #eee;
    }
    
    #file-list-zone li:last-child {
      border-bottom: none;
    }
    
    #submit-file {
      background-color: #4CAF50;
      color: white;
  }
  
  /* ファイルアップロード */
  #file-submit-modal .file-table {
      width: 100%;
      border-collapse: collapse;
      margin-top: 10px;
  }
  
  #file-submit-modal .file-table th, .file-table td {
      border: 1px solid #ddd;
      padding: 8px;
      text-align: center;
  }
  
  #file-submit-modal .file-table th {
      background-color: #d1d1d1;
  }
  
  #file-submit-modal .remove-file {
      background: none;
      color: red;
      font-size: 16px;
      border: none;
      cursor: pointer;
  }
  
  #file-submit-modal .remove-file:hover {
      color: darkred;
  }
  
  #file-submit-modal .progress-container {
      width: 100%;
      text-align: center;
      margin-top: 5px;
  }
  
  #file-submit-modal progress {
      width: 90%;
      height: 8px;
  }
  
  #file-submit-modal .upload-success {
      color: green;
      margin-left: 10px;
  }
  
  #file-submit-modal .upload-failed {
      color: red;
      margin-left: 10px;
  }
  
  .disabled-button {
      background-color: #ccc !important;
      color: #666 !important;
      cursor: not-allowed !important;
  }
  
  /* ファイルアイコンコンテナ */
  #attachment-file-icon-container {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); /* 120px 幅で自動調整 */
      gap: 10px; /* アイコン間の余白 */
      padding: 10px;
      justify-content: center;
  }
  
  /* ファイルアイコンのデザイン */
  #attachment-file-icon-container .file {
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      padding: 10px;
      border-radius: 8px;
      background-color: #f9f9f9;
      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
      transition: transform 0.2s, box-shadow 0.2s;
      cursor: pointer;
  }
  
  #attachment-file-icon-container .file:hover {
      transform: scale(1.05);
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  }
  
  /* ファイルアイコン */
  #attachment-file-icon-container .file img {
      width: 48px; /* アイコンサイズ */
      height: 48px;
      object-fit: contain;
      margin-bottom: 5px;
  }
  
  /* ファイル名 */
  #attachment-file-icon-container .file-name {
      font-size: 12px;
      font-weight: 500;
      max-width: 100%;
      word-wrap: break-word; /* 長いファイル名を折り返す */
      white-space: normal;
      overflow-wrap: break-word;
      padding: 5px;
  }
  
  /* ファイルリストのテーブル */
  #attachment-file-list-body {
      width: 100%;
      border-collapse: collapse;
  }
  
  #attachment-file-list-body td {
      padding: 8px;
      border-bottom: 1px solid #ddd;
      text-align: left;
      font-size: 14px;
      word-wrap: break-word; /* 長いファイル名を折り返す */
      white-space: normal;
      overflow-wrap: break-word;
  }
  
  /* テーブルスタイル */
  #app-container #attachment-file-list-table {
      width: 100%;
      border-collapse: collapse;
      margin-top: 20px;
      font-size: 14px;
  }
  
  #app-container #attachment-file-list-table th {
      background-color: #d1d1d1;
      color: #333;
      text-align: left;
      padding: 12px 10px;
      border-bottom: 2px solid #ddd;
  }
  
  #app-container #attachment-file-list-table td {
      padding: 10px;
      border-bottom: 1px solid #ddd;
  }
  
  #app-container #attachment-file-list-table tr:hover {
      background-color: #f9f9f9;
  }
  /* ファイルアップロード */
  
  
  /* ファイル提出*/
  /* ファイルアイコンコンテナ */
  #submit-file-icon-container {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); /* 120px 幅で自動調整 */
      gap: 10px; /* アイコン間の余白 */
      padding: 10px;
      justify-content: center;
  }
  
  /* ファイルアイコンのデザイン */
  #submit-file-icon-container .file {
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      padding: 10px;
      border-radius: 8px;
      background-color: #f9f9f9;
      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
      transition: transform 0.2s, box-shadow 0.2s;
      cursor: pointer;
  }
  
  #submit-file-icon-container .file:hover {
      transform: scale(1.05);
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  }
  
  /* ファイルアイコン */
  #submit-file-icon-container .file img {
      width: 48px; /* アイコンサイズ */
      height: 48px;
      object-fit: contain;
      margin-bottom: 5px;
  }
  
  /* ファイル名 */
  #submit-file-icon-container .file-name {
      font-size: 12px;
      font-weight: 500;
      max-width: 100%;
      word-wrap: break-word; /* 長いファイル名を折り返す */
      white-space: normal;
      overflow-wrap: break-word;
      padding: 5px;
  }
  
  /* ファイルリストのテーブル */
  #submit-file-list-body {
      width: 100%;
      border-collapse: collapse;
  }
  
  #submit-file-list-body td {
      padding: 8px;
      border-bottom: 1px solid #ddd;
      text-align: left;
      font-size: 14px;
      word-wrap: break-word; /* 長いファイル名を折り返す */
      white-space: normal;
      overflow-wrap: break-word;
  }
  
  /* テーブルスタイル */
  #app-container #submit-file-list-table {
      width: 100%;
      border-collapse: collapse;
      margin-top: 20px;
      font-size: 14px;
  }
  
  #app-container #submit-file-list-table th {
      background-color: #d1d1d1;
      color: #333;
      text-align: left;
      padding: 12px 10px;
      border-bottom: 2px solid #ddd;
  }
  
  #app-container #submit-file-list-table td {
      padding: 10px;
      border-bottom: 1px solid #ddd;
  }
  
  #app-container #submit-file-list-table tr:hover {
      background-color: #f9f9f9;
  }
  /* ファイル提出 */
  
  /* キーワード */
  #keyword-screen {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
  }
  #keyword-input {
      padding: 10px;
      font-size: 18px;
      width: 200px;
      text-align: center;
  }
  #keyword-submit {
      margin-top: 10px;
      padding: 10px;
      font-size: 16px;
      cursor: pointer;
      background: #007bff;
      color: white;
      border: none;
      border-radius: 5px;
      width: 200px;
  }
  /* キーワード */
  
  /* アイコンボタンのスタイル */
  .icon-button {
      background: none;
      border: none;
      color: #333;
      font-size: 1rem;
      cursor: pointer;
      transition: color 0.3s ease;
      display: inline-flex;
      align-items: center;
      gap: 5px;
  }
  
  .icon-button i {
      font-size: 1.2rem;
  }
  
  .icon-button:hover {
      color: #1168cb;
  }
  
  .icon-button:focus {
      outline: none;
      color: #4CAF50;
  }
  
  /* カスタム右クリックメニュー */
  #attachment-context-menu {
      position: absolute;
      background: white;
      border: 1px solid #ccc;
      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
      border-radius: 5px;
      padding: 5px;
      z-index: 1000;
  }
  
  #attachment-context-menu ul {
      list-style: none;
      margin: 0;
      padding: 0;
  }
  
  #attachment-context-menu li {
      padding: 8px 15px;
      cursor: pointer;
      font-size: 14px;
  }
  
  #attachment-context-menu li:hover {
      background: #f0f0f0;
  }
  
  #submit-context-menu {
      position: absolute;
      background: white;
      border: 1px solid #ccc;
      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
      border-radius: 5px;
      padding: 5px;
      z-index: 1000;
  }
  
  #submit-context-menu ul {
      list-style: none;
      margin: 0;
      padding: 0;
  }
  
  #submit-context-menu li {
      padding: 8px 15px;
      cursor: pointer;
      font-size: 14px;
  }
  
  #submit-context-menu li:hover {
      background: #f0f0f0;
  }
  
  /* ビューアーモーダル */
  #viewer-modal {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.8);
      display: flex;
      justify-content: center;
      align-items: center;
      z-index: 1000;
  }
  
  /* 背景クリックで閉じる */
  #viewer-overlay {
      position: absolute;
      width: 100%;
      height: 100%;
  }
  
  /* モーダルコンテンツ */
  #viewer-content {
      position: relative;
      background: white;
      padding: 15px;
      border-radius: 8px;
      max-width: 90vw;  /* 画面幅の90%以内 */
      max-height: 90vh; /* 画面高の90%以内 */
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
  }
  
  /* 閉じるボタン */
  #viewer-close {
      position: absolute;
      top: -15px;
      right: -15px;
      width: 30px;
      height: 30px;
      font-size: 24px;
      font-weight: bold;
      text-align: center;
      line-height: 30px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.8);
      color: #333;
      cursor: pointer;
      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
      transition: background 0.2s ease-in-out;
  }
  
  #viewer-close:hover {
      background: rgba(255, 255, 255, 1);
  }
  
  /* コンテンツエリア */
  #viewer-body {
      width: 95%;
      height: 95%;
      display: flex;
      justify-content: center;
      align-items: center;
  }
  
  /* 画像 & 動画のスタイル */
  #viewer-body img, #viewer-body video {
      max-width: 90%; /* モーダル内に収まるように調整 */
      max-height: 90%; /* モーダル内に収まるように調整 */
      object-fit: contain; /* 縦横比を維持して縮小 */
  }
  
  /* --- From 67922418b54ba9063641435 --- */
  /* Hero Section */
  .hero {
      display: flex;
      justify-content: center;
      align-items: center;
      height: 100vh;
      background: var(--main-color) !important;
      color: #fff;
      text-align: center;
      font-family: Arial, sans-serif;
  }
  
  .hero-content {
      background: #fff;
      padding: 40px;
      border-radius: 10px;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
      width: 100%;
      max-width: 400px;
      text-align: center;
  }
  
  .hero-content h1 {
      font-size: 24px;
      color: #333;
      margin-bottom: 20px;
  }
  
  /* Login Form */
  #loginFormWrapper {
      width: 100%;
  }
  
  .login-form input {
      width: 100%;
      padding: 12px;
      margin: 10px 0;
      border: 1px solid #ccc;
      border-radius: 5px;
      font-size: 16px;
      box-sizing: border-box;
  }
  
  .login-form input:focus {
      border-color: var(--main-color);
      outline: none;
  }
  
  #togglePassword {
      font-size: 12px;
      color: var(--main-color);
      cursor: pointer;
      text-align: right;
  }
  
  .mainButton {
      width: 100%;
      padding: 12px;
      background-color: #4CAF50;
      color: white;
      border: none;
      border-radius: 5px;
      font-size: 18px;
      cursor: pointer;
      transition: background-color 0.3s ease;
  }
  
  .mainButton:hover {
      background-color: #45a049;
  }
  
  .subButton {
      width: 100%;
      padding: 12px;
      background-color: #888888;
      color: white;
      border: none;
      border-radius: 5px;
      font-size: 18px;
      cursor: pointer;
      transition: background-color 0.3s ease;
  }
  
  .subButton:hover {
      background-color: #666666;
  }
  
  /* Main Content */
  .main-content {
      padding: 20px;
      font-family: Arial, sans-serif;
      text-align: center;
  }
  
  .main-content h2 {
      font-size: 28px;
      color: #333;
  }
  
  /* Logout Button */
  .btn-backtoindex {
      padding: 12px 20px;
      font-size: 16px;
      border: none;
      border-radius: 5px;
      background-color: #f44336;
      color: white;
      cursor: pointer;
      transition: background-color 0.3s ease;
  }
  
  .btn-backtoindex:hover {
      background-color: #d32f2f;
  }
  
  #login-logo {
    width: 320px;
    animation: bounceIn 1.2s ease-out;
  }

  .float-icon {
    position: absolute;
    opacity: 0.2;
    animation: floatIcon 10s infinite ease-in-out;
    pointer-events: none;
  }

  @keyframes bounceIn {
    0% {
      opacity: 0;
      transform: scale(0.5) rotate(-20deg);
    }
    100% {
      opacity: 1;
      transform: scale(1) rotate(0deg);
    }
  }

  @keyframes floatIcon {
    0% {
      transform: translateY(0) rotate(0deg);
    }
    50% {
      transform: translateY(-20px) rotate(10deg);
    }
    100% {
      transform: translateY(0) rotate(0deg);
    }
  }

  .login-wrapper {
    position: relative;   /* 絶対配置のアイコンをこの中に閉じ込める基準に */
    overflow: hidden;     /* はみ出した .float-icon を隠す */
    height: 100vh;        /* Hero セクションと同じ高さを確保 */
  }

  #sdgs-selection .sdgs-icon {
    position: relative;                /* チェック用疑似要素の基準 */
    width: 100px;
    height: 100px;
    cursor: pointer;
    /* 未選択時はグレースケール＋半透明 */
    filter: grayscale(100%) opacity(0.4);
    transition: filter 0.2s, transform 0.2s;
  }
  #sdgs-selection .sdgs-icon:hover {
    /* ホバー時は少し色を戻して拡大 */
    filter: grayscale(0%) opacity(0.8);
    transform: scale(1.0);
  }
  
  /* 選択状態 */
  #sdgs-selection .sdgs-icon.selected {
    /* フルカラー＋不透明＋拡大 */
    filter: grayscale(0%) opacity(1);
    transform: scale(1.1);
    z-index: 1;
  }

  /* ── ② ファイルリスト内タグ列 ── */
  .file-table [id^="tag-"] .sdgs-icon {
    width: 32px; height: 32px;
    filter: none !important;       /* ファイルリストでは常にカラー表示 */
    opacity: 1 !important;
    transform: none !important;
    box-shadow: 0 0 2px rgba(0,0,0,0.2);
    border-radius: 4px;
    margin: 2px;
  }

  /* ── 学年・組を横並びに ── */
.grade-class-group {
    display: flex;
    align-items: flex-end; /* ラベルとselectのベースラインを揃える */
    gap: 16px;             /* 学年と組の間隔 */
    margin-bottom: 1rem;
  }
  .grade-class-group .grade-group,
  .grade-class-group .class-group {
    display: flex;
    flex-direction: column;
  }
  .grade-class-group label {
    margin-bottom: 0.25rem;
    font-weight: 500;
  }
  
  /* 編集モーダル内 SDGs グリッド */
.sdgs-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40px,1fr));
    gap: 8px;
  }
  .sdgs-selection-grid img {
    width: 40px; height: 40px;
    cursor: pointer;
    filter: grayscale(100%) opacity(0.4);
    transition: filter 0.2s, transform 0.2s;
  }
  .sdgs-selection-grid img.selected {
    filter: none;
    opacity: 1;
    transform: scale(1.1);
    border: 2px solid var(--main-color);
    border-radius: 4px;
  }

  /* ── 概要プレビューを改行保持＋2行で省略 ── */
.file-table td[data-column="description"] {
    /* multiline truncation */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-align: left;
    /* 改行を保つ */
    white-space: pre-line;
    word-break: break-word;
  }

  #submit-file-list-table .sdgs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(32px, 1fr));
    gap: 4px;
  }
  
  #submit-file-list-table .sdgs-icon {
    width: 32px;
    height: 32px;
    object-fit: contain; /* 画像が歪まないように */
  }

  /* 概要プレビュー：改行保持＋2行省略＋省略時に・・・を表示 */
  .description-preview {
    position: relative;
    line-height: 1.4em;
    max-height: calc(1.4em * 2);
    overflow: hidden;
    white-space: normal;
    word-break: break-word;
  }
  .description-preview.truncated::after {
    content: '…';
    position: absolute;
    bottom: 0;
    right: 0;
    padding-left: 4px;
    background: inherit;
    font-size: 1.2em;
    line-height: 1;
  }

  /* ===== ビューアータブ切り替え ===== */
  #viewer-content {
    width: 90vw;      /* 画面幅の90% */
    height: 90vh;     /* 画面高の90% */
    padding: 20px;    /* 内側余白を広げる */
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
  }

/* ── タイトルを上部固定 ── */
.viewer-modal-title {
  margin: 0 0 16px;
  font-size: 1.75rem;
  color: var(--text-color);
  text-align: center;
  flex-shrink: 0;   /* 縮小しない */
}

/* ── ビューアー本体領域 ── */
#viewer-body {
    flex: 1 1 auto;   /* タイトル以外の領域を占有 */
    overflow: auto;   /* 必要に応じスクロール */
  }
  .viewer-tabs {
    width: 100%;
    height: 100%;
  }
  
  /* タブリスト */
  .viewer-tabs .tab-list {
    display: flex;
    border-bottom: 2px solid #ccc;
    margin-bottom: 8px;
    list-style: none;
    padding: 0;
  }
  .viewer-tabs .tab-list li {
    flex: 1;
    text-align: center;
    padding: 8px 0;
    cursor: pointer;
    font-weight: 500;
    color: #666;
    transition: background 0.2s, color 0.2s;
  }
  .viewer-tabs .tab-list li.active {
    border-bottom: 3px solid var(--main-color);
    color: var(--main-color);
  }
  
  /* タブコンテンツ */
  .viewer-tabs .tab-content {
    display: none;
    height: 95%;
    overflow: auto;
  }
  .viewer-tabs .tab-content.active {
    display: block;
  }
  
  /* メディアエリア */
  #viewer-media img,
  #viewer-media video {
    width: 100%;
    height: 80vh;
    display: block;
    margin: 0 auto;
  }
  
  /* 概要エリア */
  #viewer-info .file-description {
    background: #f9f9f9;
    padding: 12px;
    border-radius: 6px;
  }
  #viewer-info .file-description h4 {
    margin-top: 0;
  }
  #viewer-info .description-text {
    white-space: pre-wrap;
    line-height: 1.6;
    word-break: break-word;
  }

  /* ── レスポンシブ ── */
@media (max-width: 768px) {
    #viewer-content {
      width: 95vw;
      height: 95vh;
      padding: 12px;
    }
    .viewer-modal-title {
      font-size: 1.4rem;
      margin-bottom: 12px;
    }
  }

  #edit-file-modal {
    --bs-modal-width: 100%;
    font-size: 22px;
  }

  .modal.show .modal-dialog {
    display: flex;
    justify-content: center;
  }
  
  #breadcrumb-container {
    margin-bottom: 30px;
  }

  #keyword-screen .tutorial-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 16px;
  }
  #keyword-screen .tutorial-gallery .thumb {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #f7f7f9;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease;
  }
  #keyword-screen .tutorial-gallery .thumb:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0,0,0,.08);
  }
  #keyword-screen .thumb-img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 8px;
    background: linear-gradient(135deg,#e5e7eb,#f3f4f6);
  }
  #keyword-screen .thumb-title {
    font-size: 24px;
    color: #374151;
    text-align: left;
  }
  #keyword-screen .thumb-play {
    position: absolute;
    right: 14px;
    bottom: 14px;
    font-size: 20px;
    background: rgba(0,0,0,.55);
    color: #fff;
    line-height: 1;
    padding: 6px 10px;
    border-radius: 999px;
    pointer-events: none;
  }

  /* --- モーダル --- */
  #video-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 1000;
  }
  #video-modal[aria-hidden="false"] {
    display: block;
  }
  #video-modal .vm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(2px);
  }
  #video-modal .vm-dialog {
    position: relative;
    width: min(92vw, 1600px);
    margin: 3vh auto 0;
    background: #0b0b0bcc;
    border-radius: 14px;
    padding: 14px 14px 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,.35);
  }
  #video-modal .vm-close {
    position: absolute;
    right: 8px;
    top: 6px;
    font-size: 24px;
    background: transparent;
    color: #fff;
    border: none;
    cursor: pointer;
    padding: 6px 10px;
  }
  #video-modal #vm-player {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 8px;
  }
  #video-modal .vm-caption {
    color: #f3f4f6;
    font-size: 14px;
    margin-top: 8px;
  }

  @media (max-width: 768px) {
    #keyword-screen .tutorial-gallery {
      grid-template-columns: 1fr;
    }
    #keyword-screen .thumb-title {
        font-size: 16px;
        color: #374151;
        text-align: left;
    }
  }