/* --- 全体共通 --- */
html,
body {
  height: 100%;
  overflow: hidden;
  font-family: "Helvetica Neue", Arial, sans-serif;
  background-color: #18181b;
  color: #f5f5f5;
  margin: 0;
}

/* --- flatpickr カスタム --- */
.flatpickr-calendar {
  background: #1f1f23;
  border: 1px solid #444;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.6);
}

.flatpickr-months .flatpickr-month {
  background: #26262c;
  color: #f5f5f5;
}

.flatpickr-weekday {
  color: #bf94ff;
}

.flatpickr-day.today {
  border-color: #9146ff;
}

.flatpickr-day.selected {
  background: #9146ff;
  color: #fff;
}

/* --- 固定ヘッダー --- */
.fixed-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(90deg, #1f1f23, #26262c);
  backdrop-filter: blur(8px);
  z-index: 1000;
  padding: 12px 20px 4px 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
  border-bottom: 1px solid #333;
  height: auto;
  /* ← 高さがコンテンツに応じて伸びるように */
}

.page-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  position: relative;
}

.home-icon {
  font-size: 1.8em;
  color: #bf94ff;
  transition: 0.2s;
}

.home-icon:hover {
  color: #ffffff;
  transform: scale(1.1);
}

.page-text {
  font-size: 1.4em;
  font-weight: bold;
  margin-right: auto;
}

.form-area {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  /* 左：検索、右：並び替え */
  gap: 10px;
  align-items: flex-start;
  background: rgba(46, 46, 51, 0.95);
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 4px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 4px rgba(255, 255, 255, 0.02);
}

.search-form,
.sort-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  width: 100%;
  /* ← 必須 */
  max-width: 100%;
  /* ← 念のためこれも */
}

h2 {
  margin: 6px 0;
  font-size: 1.2em;
  color: #ffffff;
}

.fixed-header-area {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: #1f1f23;
  /* 背景塗りつぶしで下のスクロール見えないように */
}

.clip-scroll-area {
  height: calc(100vh - 10px);
  overflow-y: auto;
  padding: 0 5px;
  box-sizing: border-box;
  margin-top: 10px;
  padding-bottom: 20px;
}

.search-form input,
.sort-form select {
  padding: 6px 12px;
  border: 1px solid #444;
  border-radius: 6px;
  background: #1f1f23;
  color: #fff;
  transition: 0.2s;
  font-size: 0.9em;
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.3);
  width: auto;
  /* ← これで必要以上に広がらない */
  max-width: 100%;
}

.search-form input:focus,
.sort-form select:focus {
  outline: none;
  box-shadow: 0 0 6px #bf94ff, inset 0 0 6px rgba(0, 0, 0, 0.5);
}

.search-form button,
.sort-form button {
  background: linear-gradient(145deg, #9146ff, #772ce8);
  color: #fff;
  font-weight: bold;
  padding: 6px 14px;
  border-radius: 6px;
  box-shadow: 0 0 6px rgba(145, 70, 255, 0.6);
  transition: all 0.3s;
  border: none;
  font-size: 0.9em;
}

.search-form button:hover,
.sort-form button:hover {
  background: #bf94ff;
  box-shadow: 0 0 12px #bf94ff;
  transform: scale(1.05);
}

.search-form button,
.sort-form button {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-form button:active,
.sort-form button:active {
  transform: scale(0.97);
  box-shadow: 0 0 6px #bf94ff;
}

/* --- カードグリッド --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

/* --- カードリンク --- */
.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* --- カード --- */
.card {
  background: #26262c;
  padding: 12px;
  border-radius: 10px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
  transition: all 0.3s;
  display: block;
}

.card:hover {
  transform: scale(1.03);
  box-shadow: 0 0 14px #bf94ff;
}

.thumb {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  border-radius: 8px;
}

.thumb img {
  width: 100%;
  border-radius: 8px;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp 0.6s ease forwards;
  transition: all 0.3s;
}

.thumb:hover img {
  opacity: 0.85;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- 再生アイコン --- */
.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(255, 255, 255, 0.95);
  font-size: 2em;
  opacity: 0;
  transition: opacity 0.2s;
}

.thumb:hover .play-icon {
  opacity: 1;
}

/* --- サムネ内情報 --- */
.thumb .clip-info {
  position: absolute;
  font-size: 0.7em;
  background: rgba(0, 0, 0, 0.7);
  padding: 2px 6px;
  border-radius: 4px;
  color: #fff;
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.7);
}

.clip-length {
  top: 5px;
  left: 5px;
}

.clip-views {
  bottom: 5px;
  left: 5px;
}

.clip-date {
  bottom: 5px;
  right: 5px;
}

/* --- タイトル --- */
.title {
  margin-top: 8px;
  font-size: 1em;
  font-weight: bold;
  color: #f5f5f5;
  text-align: left;
  word-wrap: break-word;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.4;
  height: calc(1.4em * 2);
  letter-spacing: 0.02em;
}

/* --- ローディング & 終了表示 --- */
#loading,
#end-message {
  text-align: center;
  padding: 15px;
  color: #999;
  display: none;
}

#loading::after {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-top: 5px;
  background: #9146ff;
  border-radius: 50%;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.5);
    opacity: 0.6;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* --- モバイル対応 --- */
@media screen and (max-width: 1024px) {
  .clip-scroll-area {
    height: calc(100% - 380px);
    /* ← 高さ調整も忘れずに */
    margin-top: 380px;
    /* ← 余白も広げる */
  }
}

/* --- 問い合わせリンク --- */
.inquiry-container {
  background: rgba(46, 46, 51, 0.95);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.7);
  width: 90%;
  max-width: 500px;
  margin: 60px auto;
}

.inquiry-card h1 {
  text-align: center;
  margin-bottom: 20px;
  color: #bf94ff;
  font-size: 1.8em;
}

.inquiry-card label {
  display: block;
  margin-top: 15px;
  margin-bottom: 5px;
  font-weight: bold;
  color: #bf94ff;
}

.inquiry-card input,
.inquiry-card textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  background: #1f1f23;
  color: #fff;
  box-sizing: border-box;
  border: none;
  font-size: 1em;
}

.inquiry-card input:focus,
.inquiry-card textarea:focus {
  outline: none;
  box-shadow: 0 0 8px #bf94ff;
  transform: scale(1.02);
  transition: 0.2s;
}

.inquiry-card button {
  background: linear-gradient(145deg, #9146ff, #772ce8);
  color: #fff;
  font-weight: bold;
  padding: 12px;
  border-radius: 8px;
  margin-top: 20px;
  width: 100%;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 0 6px rgba(145, 70, 255, 0.6);
  font-size: 1.1em;
}

.inquiry-card button:hover {
  background: #bf94ff;
  transform: scale(1.05);
  box-shadow: 0 0 12px #bf94ff;
}

.inquiry-card button:active {
  transform: scale(0.98);
}

/* 共通の中央寄せ調整 */
.page-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 40px);
  padding: 40px 16px;
  box-sizing: border-box;
}

.inquiry-page .inquiry-card {
  width: 100%;
  max-width: 500px;
  background: rgba(46, 46, 51, 0.95);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.7);
}

up.date-range {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.form-group.date-range label {
  margin-bottom: 0;
  white-space: nowrap;
}

.form-group.date-range input {
  width: auto;
  min-width: 140px;
  flex: 0 1 auto;
}

.form-group.date-range span {
  margin: 0 4px;
}

.search-form label {
  display: inline-block;
  white-space: nowrap;
  line-height: 1.5;
}

.form-group label {
  display: inline-block;
  white-space: nowrap;
}

.form-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* 通常状態 */
.sort-form .toggle-group .button2 {
  background: linear-gradient(145deg, #9146ff, #772ce8);
  opacity: 0.8;
  transition: all 0.3s ease;
  padding: 6px 14px;
  color: #fff;
  font-weight: bold;
  border-radius: 6px;
}

/* active状態 */
.sort-form .toggle-group .button2.active {
  background: linear-gradient(145deg, #bf94ff, #9146ff) !important;
  opacity: 1;
  color: #fff !important;
  transform: scale(1.1);
  font-weight: bold;
  box-shadow: 0 0 12px rgba(191, 148, 255, 0.8);
}

/* hover状態 */
.sort-form .toggle-group .button2:hover {
  background: linear-gradient(145deg, #bf94ff, #9146ff);
  opacity: 1;
  transform: scale(1.05);
}

/* --- 並び替えボタンの非アクティブ状態 --- */
button2 {
  background: #2c2c34;
  /* 背景色 */
  color: #f5f5f5;
  /* テキスト色 */
  opacity: 0.8;
  transition: all 0.3s ease;
  border: 1px solid #444;
  border-radius: 6px;
}

/* --- 並び替えボタンが選択されているアクティブ状態 --- */
button2.active {
  background: linear-gradient(145deg, #6a4fff, #3c34d2);
  /* グラデーション背景 */
  color: #fff !important;
  /* 文字色 */
  transform: scale(1.1);
  /* サイズ拡大 */
  font-weight: bold;
  box-shadow: 0 0 12px rgba(106, 79, 255, 0.8);
  /* シャドウ効果 */
}

/* --- 並び替えボタンの非アクティブ状態 --- */
.sort-form .toggle-group .button2 {
  background: #2c2c34;
  /* 背景色 */
  color: #f5f5f5;
  /* テキスト色 */
  opacity: 0.8;
  transition: all 0.3s ease;
  padding: 6px 14px;
  font-weight: bold;
  border-radius: 6px;
  border: 1px solid #444;
}

/* --- 並び替えボタンが選択されているアクティブ状態 --- */
.sort-form .toggle-group .button2.active {
  background: linear-gradient(145deg, #bf94ff, #9146ff) !important;
  opacity: 1;
  color: #fff !important;
  /* 文字色 */
  transform: scale(1.1);
  /* サイズ拡大 */
  font-weight: bold;
  box-shadow: 0 0 12px rgba(191, 148, 255, 0.8);
  /* シャドウ効果 */
}

/* --- 並び替えボタンのホバー状態 --- */
.sort-form .toggle-group .button2:hover {
  background: linear-gradient(145deg, #bf94ff, #9146ff);
  opacity: 1;
  transform: scale(1.05);
}

.page-comment {
  font-size: 0.8em;
  color: #ccc;
  margin-left: 10px;
  white-space: nowrap;
}

.category-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 0 0;
  padding: 6px 0 0 0;
  align-items: center;
}

.category-btn {
  background: #2c2c34;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 0.9em;
  color: #fff;
  text-decoration: none;
  transition: all 0.3s ease;
}

.category-btn:hover {
  background: #9146ff;
  box-shadow: 0 0 10px #9146ff;
  transform: scale(1.05);
}

.hidden-categories {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 0 0;
  padding: 6px 0 0 0;
}

.hidden-categories.show {
  display: flex;
}

.comment-block {
  background: linear-gradient(to bottom right, #2c2c34, #1f1f23);
  border-left: 4px solid #9146ff;
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 12px;
}

.comment-meta {
  font-weight: bold;
  margin-bottom: 2px;
  color: #555;
}

.comment-text {
  margin-left: 1em;
}

#clipModal {
  cursor: pointer;
}

#modalContent {
  cursor: default;
}

.clip-likes {
  top: 5px;
  right: 5px;
}

/* --- モーダル全体 --- */
.clip-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 20px;
  overflow-y: auto;
}

.clip-modal-content {
  display: flex;
  background: #1f1f23;
  padding: 20px;
  border-radius: 12px;
  max-width: 900px;
  width: 100%;
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.7);
  position: relative;
  color: #f5f5f5;
  display: flex;
  /* flex-direction: row; デフォルトは縦並び */
  flex-direction: column;
  /* デフォルトは縦並び */
  gap: 20px;
  /*height: 90vh;  ← ここがポイント */
  /*max-height: 90vh;  過剰には伸びすぎないように */
  overflow: hidden;
}

.clip-iframe {
  width: 100%;
  height: 480px;
  border-radius: 10px;
  margin-bottom: 16px;
}

/* PCサイズ以上では横並びに変更 
@media screen and (min-width: 1024px) {
    .clip-modal-content {
      flex-direction: row;
      align-items: flex-start;
    }
  
    .clip-iframe {
      width: 100%;
      height: 500px;
    }
  
    .modal-left {
      width: 60%;
      display: flex;
      flex-direction: column;
      padding-right: 20px;
    }
  
    .modal-actions {
      width: 100%;
      display: flex;
      gap: 10px;
    }
  
    .modal-comments {
        width: 40%;
        height: 100%;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
  }*/

/* --- 閉じるボタン --- */
.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  color: #fff;
  border: none;
  font-size: 1.4em;
  cursor: pointer;
}

/* --- アクションボタン --- */
.modal-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.modal-button {
  padding: 10px 16px;
  font-size: 1em;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: bold;
  transition: 0.2s;
}

.like-btn {
  background: #9146ff;
  color: white;
}

.like-btn:hover {
  background: #bf94ff;
}

.list-btn {
  background: #2c2c34;
  color: #fff;
  border: 1px solid #444;
}

.list-btn:hover {
  background: #444;
}

/* --- コメント欄 --- */
.modal-comments {
  width: 40%;
  height: 100%;
  /* モーダルと同じ高さにする */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-right: 8px;
  /* スクロールバー分の余白 */
}

.comment-form textarea {
  width: 100%;
  height: 80px;
  padding: 10px;
  background: #2c2c34;
  color: white;
  border: 1px solid #444;
  border-radius: 6px;
  resize: vertical;
  font-size: 0.95em;
}

.comment-form button {
  margin-top: 8px;
  padding: 8px 16px;
  background: #9146ff;
  border: none;
  border-radius: 6px;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}

.comment-form button:hover {
  background: #bf94ff;
}

.comment-list {
  font-size: 0.9em;
  color: #ddd;
  flex-grow: 1;
  overflow-y: auto;
  padding-right: 8px;
}

.comment-list .comment-block {
  padding: 10px 0;
  border-top: none !important;
  border-bottom: none !important;
}

.modal-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.modal-input {
  padding: 8px 12px;
  border-radius: 6px;
  background: #2c2c34;
  border: 1px solid #444;
  color: #fff;
  font-size: 0.95em;
  width: 100%;
  box-sizing: border-box;
}

.modal-input::placeholder {
  color: #aaa;
}

#listPopup h3 {
  color: #fff;
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 2001 !important;
  justify-content: center;
  align-items: center;
}

.login-info {
  background: rgba(255, 255, 255, 0.05);
  padding: 8px 12px;
  margin-bottom: 12px;
  border-radius: 6px;
  color: #ffffff;
  font-size: 0.95em;
  font-weight: bold;
}

.error-message {
  color: #f66;
  margin-top: 10px;
  font-size: 0.9em;
}

.success-message {
  color: #6f6;
  margin-top: 10px;
  font-size: 0.9em;
}

#formFeedback {
  text-align: center;
  margin-top: 10px;
  min-height: 1.4em;
  /* ← 空のときも高さを確保 */
  font-weight: bold;
}

#formFeedback.error-message {
  color: #f66 !important;
  background: rgba(255, 100, 100, 0.1);
  padding: 8px;
  border-radius: 6px;
}

#formFeedback.success-message {
  color: #6f6 !important;
  background: rgba(100, 255, 100, 0.1);
  padding: 8px;
  border-radius: 6px;
}

.form-container {
  max-width: 400px;
  margin: 60px auto;
  background: #1f1f23;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.4);
  color: #fff;
}

.form-container h2 {
  margin-bottom: 16px;
  color: #ffffff;
}

.form-container input {
  width: 100%;
  padding: 10px;
  margin-bottom: 12px;
  border-radius: 6px;
  border: 1px solid #444;
  background: #2c2c34;
  color: #fff;
}

.form-container button {
  width: 100%;
  background: #9146ff;
  color: #fff;
  border: none;
  padding: 10px;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
}

.form-container button:hover {
  background: #bf94ff;
}

.error-message {
  color: #f66;
  margin-bottom: 12px;
  font-size: 0.95em;
}

.form-container a {
  display: block;
  text-align: center;
  margin-top: 12px;
  color: #ffffff;
  font-size: 0.9em;
  text-decoration: underline;
}

* {
  box-sizing: border-box;
}

.login-btn {
  display: inline-block;
  background: linear-gradient(145deg, #9146ff, #772ce8);
  color: white;
  font-weight: bold;
  padding: 12px 20px;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 0 10px rgba(145, 70, 255, 0.4);
  transition: all 0.3s ease;
}

.login-btn:hover {
  background: #bf94ff;
  box-shadow: 0 0 16px #bf94ff;
  transform: scale(1.05);
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 10px #9146ff;
  }

  50% {
    box-shadow: 0 0 20px #bf94ff;
  }

  100% {
    box-shadow: 0 0 10px #9146ff;
  }
}

.login-btn {
  animation: pulseGlow 2s infinite;
}

.sidebar a {
  display: flex;
  background: #222;
  color: #fff;
  font-weight: bold;
  padding: 10px 16px;
  margin-bottom: 12px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  text-align: left;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.sidebar a:hover {
  background: rgba(255, 255, 255, 0.05);
  box-shadow: rgba(255, 255, 255, 0.05);
  transform: scale(1.05);
  text-decoration: none !important;
}

.icon {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  margin-right: 8px;
  stroke: #ffffff;
}

.modal-button svg {
  margin-right: 6px;
  vertical-align: middle;
}

.comment-meta {
  font-size: 0.85em;
  color: #aaa;
  margin-bottom: 4px;
}

.comment-text {
  margin-top: 4px;
  color: #ddd;
  white-space: pre-wrap;
  line-height: 1.5;
}

.comment-form {
  margin-bottom: 10px;
}

.comment-list .comment-block,
.comment-block,
.comment-text,
.comment-list hr {
  border: none !important;
}

.comment-block {
  background: linear-gradient(to bottom right, #2c2c34, #1f1f23);
  border-left: 4px solid #9146ff;
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 12px;
}

.filter-toggle-btn {
  margin-left: 8px;
  padding: 6px 12px;
  border: 1px solid #ccc;
  background: #444;
  color: white;
  border-radius: 4px;
  cursor: pointer;
}

.filter-toggle-btn.active {
  background: #fbbf24;
  color: black;
  font-weight: bold;
}

.modal-button.unauth {
  background-color: #555 !important;
  color: #ccc !important;
  cursor: not-allowed;
}

.modal-button.liked svg {
  fill: gold;
}

.modal-button.unauth {
  color: #aaa;
  border-color: #aaa;
}

.modal-button.unauth svg {
  fill: #aaa;
}

/* 自分のいいねだけボタン（並び替えボタンと統一） */
#toggleMyLikes {
  padding: 6px 14px;
  border-radius: 6px;
  font-weight: bold;
  transition: all 0.3s;
  margin-left: 6px;
  background: #2c2c34;
  color: #f5f5f5;
  border: 1px solid #444;
}

#toggleMyLikes:hover {
  background: #444;
  transform: scale(1.05);
}

#toggleMyLikes.active {
  background: linear-gradient(145deg, #bf94ff, #9146ff) !important;
  box-shadow: 0 0 12px rgba(191, 148, 255, 0.8);
  color: #fff;
}

.list-card {
  display: flex;
  background: #26262c;
  padding: 12px;
  border-radius: 10px;
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  align-items: flex-start;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
  transition: all 0.3s;
  flex-direction: column;
  width: 220px;
  overflow: hidden;
}

.list-card:hover {
  transform: scale(1.03);
  box-shadow: 0 0 14px #bf94ff;
}

.list-card .thumbnail {
  width: 100%;
  height: auto;
  border-radius: 6px;
  object-fit: cover;
  margin-bottom: 8px;
}

.list-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #fff;
}

.list-title {
  font-size: 1em;
  font-weight: bold;
  margin: 0;
}

.list-description {
  font-size: 0.85em;
  color: #ccc;
  margin: 0;
  white-space: normal;
}

.list-card img {
  width: 160px;
  height: 90px;
  object-fit: cover;
  border-radius: 6px;
}

.list-info h2 {
  font-size: 1.1em;
  margin: 0 0 6px;
  color: #fff;
}

.list-info p {
  font-size: 0.9em;
  color: #ccc;
  margin: 4px 0;
}

.list-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-left: auto;
}

.list-actions button {
  padding: 6px 10px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: #444;
  color: white;
  font-size: 0.85em;
  transition: background 0.2s;
}

.list-actions button:hover {
  background: #666;
}

.card-grid.my-list-mode {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* マイリスト専用カード */
.my-list-mode .card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background-color: #1f1f1f;
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
  width: 100%;
  min-height: 110px;
  /* 高さを最低限確保 */
  box-sizing: border-box;
}

/* 左の編集・削除ボタン */
.my-list-mode .card .card-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-right: 8px;
}

.my-list-mode .card .card-actions button {
  background: none;
  border: none;
  color: #aaa;
  cursor: pointer;
  font-size: 18px;
  transition: transform 0.2s;
}

.my-list-mode .card .card-actions button:hover {
  transform: scale(1.2);
}

/* サムネイル */
.my-list-mode .card .thumb {
  width: 160px;
  height: 90px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
}

.my-list-mode .card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 右側の情報エリア */
.my-list-mode .card .info-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}

.my-list-mode .card .info-area .title {
  font-size: 1em;
  font-weight: bold;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-list-mode .card .info-area .clip-meta {
  font-size: 0.85em;
  color: #ccc;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.my-list-mode .card:hover {
  /* transform: scale(1.03); ← 拡大をやめる */
  box-shadow: 0 0 14px #bf94ff;
  position: relative;
  z-index: 1;
}

/* 左の編集・削除ボタン */
.my-list-mode .card .card-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-right: 12px;
  /* 少し右に余白を作る */
  align-items: center;
  flex-shrink: 0;
}

.my-list-mode .card .card-actions button {
  background: none;
  border: none;
  color: #ccc;
  cursor: pointer;
  font-size: 18px;
  transition: transform 0.2s, color 0.2s;
  padding: 4px;
}

.my-list-mode .card .card-actions button:hover {
  transform: scale(1.3);
  color: #ff6666;
}

/* マイリスト表示（my-list-mode）ではホバー無効にする */
.card-grid.my-list-mode .card:hover {
  transform: none;
}

.edit-btn,
.delete-btn {
  cursor: pointer;
}

.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* ← これがポイント */
  gap: 12px;
  margin-bottom: 4px;
}

.list-buttons {
  display: flex;
  gap: 8px;
}

.list-buttons button {
  background: #444;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 0.85em;
  transition: 0.2s;
}

.list-buttons button:hover {
  background: #666;
}

.list-info p.description {
  font-size: 0.85em;
  color: #aaa;
  margin: 4px 0 0 0;
  line-height: 1.4;
  word-break: break-word;
}

.thumbnail {
  width: 160px;
  height: 90px;
  object-fit: cover;
  border-radius: 6px;
  margin-right: 12px;
  flex-shrink: 0;
}

.list-info {
  padding: 0.5rem;
  max-height: 5em;
  /* 約3行分 */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  /* 最大3行に制限 */
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
}

.notice-page {
  max-width: 1000px;
  margin: auto;
  padding: 20px;
  line-height: 1.6;
}

.notice-page h1 {
  font-size: 1.8em;
  color: #bf94ff;
}

.notice-page .notice-item {
  background-color: #222;
  border-left: 4px solid #bf94ff;
  padding: 16px;
  margin-bottom: 20px;
  border-radius: 4px;
}

.notice-page .notice-item h2 {
  margin-top: 0;
  font-size: 1.2em;
  color: #fff;
}

.notice-page .notice-item p {
  color: #ccc;
}

h2[onclick] {
  transition: opacity 0.2s ease;
}

h2[onclick]:hover {
  opacity: 0.8;
}

.clip-count-overlay {
  position: absolute;
  bottom: 4px;
  right: 6px;
  background-color: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.75em;
  padding: 2px 6px;
  border-radius: 4px;
  pointer-events: none;
}

.about-page {
  color: #fff;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.about-page h1 {
  font-size: 2em;
  margin-bottom: 1em;
  border-bottom: 2px solid #555;
  padding-bottom: 0.5em;
}

.about-page section {
  margin-bottom: 2em;
}

.about-page ul {
  padding-left: 1.2em;
  line-height: 1.6;
}

.about-page li::marker {
  color: #bb86fc;
}

.sunao-links {
  display: inline-flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.social-links {
  list-style: none;
  padding-left: 0;
  margin-top: 32px;
  text-align: left;
  /* ← 中央揃え → 左揃えに変更 */
  max-width: 900px;
  /* 任意。上の文章と幅を合わせる場合 */
  margin-left: auto;
  margin-right: auto;
}

.social-links li {
  margin: 8px 0;
}

.social-links a {
  color: #fff;
  text-decoration: none;
  font-size: 1.1em;
  display: inline-flex;
  align-items: center;
}

.social-links a:hover {
  text-decoration: underline;
}

.social-links .icon {
  width: 24px;
  height: 24px;
  margin-right: 8px;
  vertical-align: middle;
}

.form-feedback {
  margin-top: 10px;
  font-weight: bold;
  text-align: center;
  color: #f66;
  /* エラー時 */
}

.form-feedback.success {
  color: #6f6;
}

.tooltip-container {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.tooltip-icon {
  font-size: 16px;
  color: #ccc;
}

.tooltip-text {
  visibility: hidden;
  width: max-content;
  max-width: 600px;
  background-color: #333;
  color: #fff;
  text-align: left;
  border-radius: 6px;
  padding: 6px 10px;
  position: absolute;
  z-index: 10;
  top: 125%;
  left: 0;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 0.85em;
  white-space: normal;
}

.tooltip-container:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

.sidebar-version {
  margin-top: auto; /* 自動で一番下に */
  padding: 12px 16px;
  color: #aaa;
  font-size: 0.85rem;
  text-align: center;
  opacity: 0.6;
}

.sidebar {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

p .indent {
  display: inline-block;
  text-indent: 1em; /* or 2em 好きな幅 */
}

p strong {
  font-weight: bold;
}

/* 静的ページ専用：.scrollable クラスが付いた時だけスクロール */
.main.scrollable {
  overflow-y: auto;
}
