
:root {
    --star-selected: #ffb300;
    --star-border: #999;
    --col-1: 5%;  --col-3: 25.00%; --col-2: 20%;
}

/* 界別カラー定義 (濃 -> 淡) */
/* --- パステルカラー定義 (界:一番濃い -> 属:一番薄い) --- */
/* Plant: 爽やかなミント・エメラルドグリーン系 */
.kingdom-plant { --color-k: #a5d6a7; --color-o: #c8e6c9; --color-f: #e8f5e9; --color-g: #f5fcf4; }
/* Animal: 優しいサクラ・コーラルピンク系 */
.kingdom-animal { --color-k: #ffb3b3; --color-o: #ffd4d4; --color-f: #ffe6e6; --color-g: #fff0f0; }
/* Microbe: 清潔感のあるパステルサファイア・スカイブルー系 */
.kingdom-microbe { --color-k: #90caf9; --color-o: #bbdefb; --color-f: #e3f2fd; --color-g: #f0f8ff; }
/* Private: スッキリした明るめのシルバー・ライトグレー系 */
.kingdom-private { --color-k: #cbd5e1; --color-o: #e2e8f0; --color-f: #f1f5f9; --color-g: #f8fafc; }

/* --- パステル背景で見やすくするための文字色微調整 --- */
/* 全階層の文字色・アイコン色を白から濃いグレーに変更して視認性を確保 */
.accordion-button,
.toggle-icon,
.fav-icon-header {
    color: #555555 !important;
}

/* スティッキーヘッダー */
.global-sticky-header {
    position: sticky;
    top: 0;
    z-index: 1020;
    background-color: #f8f9fa;
/*    border-bottom: 2px solid #ddd; */
    font-weight: bold;
    font-size: 0.85rem;

    color: var(--kgp-theme-sub2);
    text-shadow: 0 .1rem .1rem rgba(0, 0, 0, .3);
    box-shadow: 0px 10px 10px -6px rgba(0, 0, 0, 0.3);
}

.accordion-header { display: flex !important; align-items: stretch !important; border: none !important; margin: 0; padding: 0; }
.accordion-button {
    font-size: 0.9rem; font-weight: bold; border-radius: 0 !important; box-shadow: none !important;
    display: flex !important; align-items: center !important; border: none !important; flex-grow: 1;
    padding-top: 5px !important; padding-bottom: 5px !important;
    min-height: 40px !important;
}
.accordion-button::after { display: none; }
.toggle-icon { display: inline-block; width: 24px; text-align: center; font-weight: bold; }
.toggle-icon::before { content: "+"; }
.accordion-button:not(.collapsed) .toggle-icon::before { content: "-"; }

/* 背景色・インデント (20px刻み) */
.bg-k { background-color: var(--color-k) !important; } .indent-k { padding-left: 1.25rem !important; }
.bg-o { background-color: var(--color-o) !important; } .indent-o { padding-left: calc(1.25rem + 20px) !important; }
.bg-f { background-color: var(--color-f) !important; } .indent-f { padding-left: calc(1.25rem + 40px) !important; }
.bg-g { background-color: var(--color-g) !important; } .indent-g { padding-left: calc(1.25rem + 60px) !important; }

.count-text { font-style: normal; font-weight: bold; margin-left: 4px; }
.scientific-name-text { font-style: italic; font-weight: bold; }

/* お気に入りボタン共通 */
.fav-icon-wrapper {
    cursor: pointer; display: flex !important; align-items: center !important; justify-content: center !important;
    width: var(--col-1); flex-shrink: 0; transition: filter 0.2s; border: none !important; margin: 0; padding: 0;
}
.fav-icon-wrapper:hover { filter: brightness(0.9); }
.star-svg { width: 20px; height: 20px; stroke: var(--star-border); stroke-width: 1px; transition: fill 0.2s; }
.not-active .star-svg { fill: #ffffff; }
.is-active .star-svg { fill: var(--star-selected); }

.accordion-flush .accordion-item { border: none !important; background: none; }
.accordion-flush .accordion-body { padding: 0 !important; }
.kingdom-block { margin-bottom: 5px !important; }

/* 種テーブル：横幅比率の固定 */
.species-area { border: 1px solid var(--color-g) !important; border-top: none !important; background-color: white; overflow: hidden; }
.fixed-table {
    width: 100%;
    table-layout: fixed; /* カラム幅を固定 */
    border-collapse: collapse;
    margin-bottom: 0;
}
.fixed-table td, .fixed-table th {
    padding: 8px;
    border-bottom: 1px solid #eee;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.85rem;
    vertical-align: middle;
}

/* 比率適用 */
.col-icon { width: var(--col-1); text-align: center; text-overflow: clip !important; }
.col-name { width: var(--col-3); }
.col-cat  { width: var(--col-2); }
.col-link { width: var(--col-2); }
.col-img  { width: var(--col-1); text-align: center; text-overflow: clip !important; }
.col-fav  { width: var(--col-1); padding: 0 !important; }
.fav-icon-wrapper.in-table { width: 100%; height: 60px; background-color: transparent; }

.thumb-icon { width: 40px; height: 40px; object-fit: contain; }
.pr-icon { width: 25px; height: 25px; object-fit: contain; }

.form-input-area { width: 100%; max-width: 300px; }
.btn-clear { font-size: 0.65rem; }

