@charset "utf-8";

body {
  background-color: #DDFFFF;
  margin: 0;
  padding: 0;
  font-family: "Meiryo", "Yu Gothic", sans-serif;
  color: #333;
  min-height: 100vh;
}

/* =========================================
   トップバー
   ========================================= */
#top-bar {
  background-color: #333;
  color: #fff;
  padding: 5px 10px; 
  display: flex;
  flex-direction: column;
  gap: 8px; 
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 3px rgba(0,0,0,0.3);
}

.top-row { display: flex; justify-content: space-between; align-items: center; width: 100%; }

.link-group { display: flex; gap: 8px; }
.nav-link-btn {
  background: #007bff; color: #fff; text-decoration: none;
  padding: 4px 10px; border-radius: 4px; font-size: 13px; transition: background 0.2s;
}
.nav-link-btn:hover { background: #0056b3; }
.nav-link-btn2 {
  background: tomato; color: #fff; text-decoration: none;
  padding: 4px 10px; border-radius: 4px; font-size: 13px; transition: background 0.2s;
}
.nav-link-btn2:hover { background: red; }

.size-row {
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
  border-bottom: 1px solid #555;
  padding-bottom: 5px;
  margin-bottom: 2px;
}

.size-btn {
  background: #444; color: #ccc; border: 1px solid #666;
  padding: 6px 14px; 
  cursor: pointer; border-radius: 3px; 
  font-size: 13px;
  min-width: 35px;
}
.size-btn.active {
  background: #20b2aa; color: #fff; border-color: #fff; font-weight: bold;
}

.control-row { display: flex; justify-content: flex-start; align-items: center; flex-wrap: wrap; gap: 8px; width: 100%; }
#settings { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.time-btn {
  background: #555; color: #ccc; border: 1px solid #777;
  padding: 4px 8px; cursor: pointer; border-radius: 3px; font-size: 12px;
}
.time-btn.active { background: #ffa07a; color: #fff; border-color: #ff8c00; font-weight: bold; }

h1 { font-size: 11px; margin: 0; font-weight: normal; }


/* =========================================
   サムネイル一覧エリア
   ========================================= */
#gallery-view {
  padding: 10px 5px; 
  display: flex; flex-wrap: wrap;
  gap: 2px; 
  justify-content: flex-start;
  row-gap: 10px; 
}

.thumb-card {
  background: #fff; border: 1px solid #ddd; padding: 1px;
  cursor: pointer; text-align: center; overflow: hidden;
  transition: transform 0.2s;
}
.thumb-card:hover { transform: translateY(-2px); border-color: #999; }

.thumb-img {
  object-fit: contain; display: block; margin: 0 auto; background-color: #eee;
}

.thumb-name {
  font-size: 8px; /* サムネイル番号 */
  font-weight: bold; 
  margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: #333;      
  line-height: 1.2;
}

/* 通常の区切り線 (hr) の設定 */
hr.divider { 
  border: none; border-top: 1px solid #999; 
  width: 100%; 
  margin: 2px 0; 
  flex-basis: 100%; 
}

/* 説明文行 (◆▼◆ / ■◆■) の設定 */
.gallery-text-row {
  flex-basis: 100%; width: 100%;
  padding: 2px 10px; 
  box-sizing: border-box;
  font-size: 16px; 
  line-height: 1.4; color: #333;
  background: transparent;
  text-align: left;
}
.gallery-text-row a { color: blue; text-decoration: underline; }

/* ★追加修正: ■◆■ の中の hr はマージンを0にする */
/* これにより、ラインの間隔が広がりすぎるのを防ぎます */
.gallery-text-row hr {
  margin: 0;
  border: none;
  /* デフォルトの線の色（指定がない場合用） */
  border-top: 1px solid #999; 
}


/* =========================================
   スライドショー画面 (オーバーレイ)
   ========================================= */
#slideshow-overlay {
  display: none; position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.95);
  z-index: 2000; flex-direction: column;
}

#slide-header {
  width: 100%; height: auto; 
  background: rgba(0,0,0,0.5); 
  display: flex; flex-direction: column; 
  padding: 5px 10px; gap: 5px;
}

.header-row-upper { width: 100%; text-align: left; }
#slide-info { font-size: 13px; color: #ddd; font-weight: normal; }

.header-row-lower {
  width: 100%; display: flex; justify-content: flex-end; align-items: center;
  gap: 20px;
}

.slide-header-nav { display: flex; gap: 15px; }

.nav-btn-rect {
  background: rgba(255, 255, 255, 0.15); color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 8px 15px; cursor: pointer; border-radius: 4px;
  font-size: 14px; min-width: 40px; backdrop-filter: blur(2px);
}
.nav-btn-rect:hover { background: rgba(255, 255, 255, 0.3); }

.close-btn {
  background: rgba(76, 175, 80, 0.6); border: 1px solid rgba(255, 255, 255, 0.5);
  color: #fff; padding: 8px 15px; cursor: pointer; border-radius: 4px;
  font-size: 14px; white-space: nowrap;
}
.close-btn:hover { opacity: 0.9; }

#slide-body {
  flex: 1; display: flex; justify-content: center; align-items: center;
  position: relative; overflow: hidden; user-select: none; width: 100%; cursor: pointer; padding: 0;
}
#main-image {
  max-width: 98%; max-height: 98%; object-fit: contain;
  box-shadow: 0 0 20px rgba(0,0,0,0.8); transition: opacity 0.2s;
}

.slide-text-container { 
  color: #fff; text-align: center; padding: 20px; 
  background: transparent; max-width: 90%; line-height: 1.5; font-size: 16px;
}
.slide-text-container a { color: #87CEFA; text-decoration: underline; cursor: default; }

.nav-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  font-size: 40px; color: rgba(255,255,255,0.15);
  cursor: pointer; padding: 20px; user-select: none; transition: color 0.2s; z-index: 2100;
}
.nav-arrow:hover { color: #fff; background: rgba(0,0,0,0.2); }
.nav-left { left: 0px; }
.nav-right { right: 0px; }

#status-icon {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-size: 80px; color: rgba(255,255,255,0.8); opacity: 0; pointer-events: none;
  transition: opacity 0.3s, transform 0.3s; z-index: 2050; text-shadow: 0 0 10px rgba(0,0,0,0.5);
}
