@import url("theme.css");
.header-top,
.toolbar,
.grid {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

header {
    background-image: url('/static/images/table-2879201_1920_trimmed.jpg'); /* ✅ 用意した画像パス */
    background-size: cover;        /* 縮尺調整して全体にフィット（切り抜きあり） */
    background-position: center;   /* 中央揃え */
    background-repeat: no-repeat;
    color: white;
    text-align: center;
    padding: 2rem 1rem;            /* 適度な上下余白 */
    background-color: #4CAF50;
}

.header-top {
    display: flex;                 /* 横並びにする */
    align-items: center;           /* 垂直方向で中央揃え */
    justify-content: space-between;/* ロゴとアバターを両端に配置 */
    /*padding: 10px 20px;
    border-bottom: 1px solid #ddd;*/
}

.title-container h2 {
    font-family: 'M PLUS Rounded 1c', sans-serif;  /* ✅ フォント変更 */
    font-size: 1.8rem;                              /* 少し大きめに */
    font-weight: 700;                               /* 太めで読みやすく */
    color: #fff;
    background-color: rgba(0, 0, 0, 0.4);           /* ✅ 半透明背景で読みやすさUP */
    padding: 0.5rem 1rem;
    border-radius: 12px;                            /* 丸みを追加 */
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);     /* ✅ 光彩で明るい画像にも負けない */
    max-width: 90%;
    margin: 0 auto;
    display: inline-block;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    align-content: start;  /* ✅ グリッド全体を上詰めに */
}

@media (min-width: 600px) {
  .grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  }
}

@media (min-width: 900px) {
  .grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}

@media (min-width: 1200px) {
  .grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

.card {
    background: var(--secondary-bg);
    padding: 15px;
    border-color: #0f0f1a;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
     max-width: 600px;  /* オリジナル画像幅に合わせる例 */
    height: 90%; /* カードの高さを揃える */
    width: 95%;           /* ✅ ←追加！グリッドの1列分フルに使う */
    margin: auto;       /* 中央寄せ */
    margin-bottom: 20px;
}

.card img {
    width: 100%;
    /*height: 200px;  表示高さを固定し、カードの表示が不ぞろいにならないようにする */
    height: auto;
    max-width: 100%;    /* オリジナルサイズ以上に広がらない */
    object-fit: cover;  /* 画像を埋めて余分をトリミング */
    border-radius: 5px;
}

.card h3 {
    margin: 10px 0 5px;
}

.card p ,span {
    font-size: 0.9em;
    color: var(--text-color);
    margin: 0 0 10px 0;
}

.card .card-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
    color: #666;
}

.detail {
    display: none;
    margin-top: 10px;
    font-size: 0.9em;
    background: #fafafa;
    padding: 10px;
    border-radius: 5px;
}

/* ラベル全体を小さくする */
.toolbar .infoBox {
    font-size: 0.85rem;   /* 小さめの文字サイズ */
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 4px;
}
/* チェックボックスのサイズを小さくする */
.toolbar .infoBox input[type="checkbox"] {
    width: 14px;
    height: 14px;
    transform: scale(0.85); /* ✅ 縮小（ブラウザによって互換性高） */
    cursor: pointer;
}

/* モバイルでの全体のツールバーのレイアウト調整 */
/* モバイルの際のスタイル調整 */
@media (max-width: 768px) {
    #search,#sort {
        width: 30%;  /* 幅を100%にして親要素にフィットさせる */
    }
    #category {
        width: 20%;  /* 幅を100%にして親要素にフィットさせる */
    }
}
/*
音声入力
 */
  #voice-button.listening  {
    background-color: #1e90ff; /* 青色 */
    color: white;
  }