body { font-family: Arial, sans-serif; margin: 0; padding: 0rem; }
h1 { margin: 0.2rem 0; font-size: 1.5rem; }
.tabs button { padding: 0.5rem 1rem; border: 1px solid #ccc; border-bottom: none; background: #f4f4f4; cursor: pointer; }
.tabs button.active { background: #ffffff; font-weight: bold; }
.tab-content { border: 1px solid #ccc; padding: 0.5rem; }
table { width: 100%; border-collapse: collapse; table-layout: auto; }
th, td { border: 1px solid #ccc; padding: 4px; }
th { background: #fafafa; position: sticky; top: 0; z-index: 2; }
tr { user-select: text; }
.text-center { text-align: center; }
.progress-text { font-weight: bold; margin: 0.2rem 0; }
table.gift-table { width: 100%; table-layout: auto; border-collapse: collapse; }
table.gift-table thead th { position: sticky; top: 0; z-index: 10; background: #fafafa; }
table.gift-table th,
table.gift-table td { padding: 4px 8px; word-break: break-all; }
.table-wrapper {
  overflow-x: auto;
  width: 100%;
  max-height: 75vh;
  overflow-y: auto;
  position: relative;
}

/* ---- 共通テーブル高さ ---- */
.fixed-table-height {
  /* 必要に応じて調整。75vh は現行 UI と並びが良い */
  height: 75vh;
  max-height: 75vh;
  overflow-y: auto;
}

/* ------------ 日本語ページ専用 ------------ */
html[lang="ja"] .fixed-table-height,
html[lang="ja"] .table-wrapper {
  height: 70vh;
  max-height: 70vh;
}

table {
  min-width: 1820px;
  width: 100%;
  border-collapse: collapse;
}
th.status-col, td.status-col {
  max-width: none;
  width: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
th.progress-col, td.progress-col {
  max-width: 80px;
  width: auto;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.header-container {
  overflow: hidden;       /* float のクリア */
  padding: 0.5rem 1rem;
}
.site-title {
  float: left;            /* 左に寄せる */
  margin: 0;              /* 見出しの上下マージンをリセット */
  line-height: 2;         /* 高さを調整して縦中央揃え */
}
.lang-switch {
  float: right;           /* 右に寄せる */
  margin-top: 0.3rem;     /* 微調整用 */
  margin-right: 1rem;
  white-space: nowrap;    /* 改行させない */
}
.lang-switch a {
  text-decoration: none;
  font-size: 0.9rem;
}

/* 選択中のフィルターボタン */
#filters .active {
  background: #007bff;
  color: #fff;
}
#filters button {
  border: 1px solid #ccc;
  background: #f4f4f4;
  cursor: pointer;
}

/* ボタン共通 */
.status-btn {
  padding: 4px 8px;
  cursor: pointer;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

td.status-col, th.status-col {
  padding: 6px 6px;
}

.status-col .status-btn {
  display: block;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 6px 0;
}

/* 検索ボックス */
#gift-search {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 16px;
  box-sizing: border-box;
  margin-top: 1rem;
}

#gift-search:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

#gift-search::placeholder {
  color: #999;
  font-style: italic;
}

/* 未獲得 */
.status-btn.unacquired {
  background-color: #f5f5f5;       /* グレー系 */
  border: 1px solid #cccccc;
  color: #666666;
}
.status-btn.unacquired:hover {
  background-color: #999999;
}

/* 獲得済 */
.status-btn.acquired {
  background-color: #28a745;       /* 緑系 */
  border: 1px solid #28a745;
  color: #ffffff;
}
.status-btn.acquired:hover {
  background-color: #218838;
}

/* 押下時の共通エフェクト */
.status-btn:active {
  transform: scale(0.97);
}

/* トーストコンテナ */
#toast-container {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 9999;
  pointer-events: none;
}

/* トースト本体 */
.toast {
  display: inline-block;
  background: #000;
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  margin-top: 8px;
  opacity: 0;
  /* 0.3秒でフェードイン、5秒後に0.5秒かけてスライドダウン＋フェードアウト */
  animation: fadeIn 0.3s ease-out forwards,
              hide 0.5s ease-in 5s forwards;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes hide {
  to { opacity: 0; transform: translateY(100%); }
}

/* Footer styling */
footer {
  text-align: center;
  padding: 0.25rem;
  background: #f4f4f4;
  font-size: 1rem;
}
.progress-bar {
  width: 100%;
  height: 5px;
  background-color: #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background-color: #4caf50;
  width: 0%;
  transition: width 0.5s ease-in-out;
}

/* Cookie同意バナー */
#cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #fff;
  padding: 1rem;
  box-shadow: 0 -2px 5px rgba(0,0,0,0.3);
  transform: translateY(100%);
  transition: transform 0.3s ease-in-out;
  z-index: 10000;
  text-align: center;
}
#cookie-consent-banner.show {
  transform: translateY(0);
}
#cookie-consent-banner p {
  margin: 0;
  font-size: 0.9rem;
}
#cookie-consent-banner .cookie-buttons {
  margin-top: 0.5rem;
}
#cookie-consent-banner .cookie-buttons button {
  margin: 0 0.5rem;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}
#cookie-consent-accept {
  background-color: #0d6efd;
  color: #fff;
}
#cookie-consent-decline {
  background-color: #6c757d;
  color: #fff;
}
#cookie-consent-accept:hover,
#cookie-consent-accept:focus-visible {
  background-color: #0b5ed7;   /* hover/focus 用に少し暗く */
  outline: 3px solid #ffffff;  /* キーボード操作時に見やすいフォーカスリング */
}

/* E.G.O ギフト獲得/未獲得 Style */
.row-acquired {
  background: #d4f4be; 
  width: 100%;
  box-sizing: border-box;
}
.row-unacquired {
  background: #d4e3f4;
  width: 100%;
  box-sizing: border-box;
}

/* 見出し＋概要を横並び */
.header-container{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:1rem;          /* 見出しとの間隔 */
  flex-wrap:wrap;    /* 画面が狭いときは折り返す */
}
.header-container h1{
  margin:0;          /* デフォルト余白を削除 */
}
.tool-summary{
  max-width:420px;
  font-size:.9rem;
}
/* モバイルで縦並びにする例 */
@media (max-width:768px){
  .header-container{flex-direction:column;}
  .tool-summary{max-width:100%;}
}
