/* static/personal_tools/css/nihon_shinwa_zukan.css */
/* 日本神話図鑑ツール専用のスタイル(他ツールとは共用しない)。 */

.pt-ns-entry-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.25rem 0 1.5rem;
}

/* ---------- 一覧: 検索・系統の絞り込み ---------- */
.pt-ns-controls {
    margin: 1rem 0 0.5rem;
}

.pt-ns-search {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    max-width: 24rem;
    margin-bottom: 0.9rem;
}

.pt-ns-search__label {
    font-weight: 700;
    font-size: 0.9rem;
    color: #333;
}

.pt-ns-search input {
    padding: 0.5rem 0.75rem;
    border: 0.0625rem solid #ccd3da;
    border-radius: 0.5rem;
    font-size: 1rem;
}

.pt-ns-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.pt-ns-chip {
    padding: 0.35rem 0.9rem;
    border: 0.0625rem solid #ccd3da;
    border-radius: 62.5rem;
    background: #fff;
    color: var(--pt-blue);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.pt-ns-chip.is-active {
    background: var(--pt-blue);
    border-color: transparent;
    color: #fff;
}

.pt-ns-filter-desc {
    min-height: 1.4em;
    margin: 0.6rem 0 0;
    font-size: 0.85rem;
    color: #5c6b78;
}

.pt-ns-count {
    margin: 0.5rem 0 0;
    font-size: 0.85rem;
    color: #5c6b78;
}

.pt-ns-empty {
    padding: 1rem;
    text-align: center;
    color: #5c6b78;
}

/* ---------- カードグリッド ---------- */
.pt-ns-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
    gap: 0.75rem;
    margin: 1rem 0 1.5rem;
}

.pt-ns-grid--compact {
    grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
}

.pt-ns-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.25rem;
    padding: 1rem 0.6rem;
    border: 0.0625rem solid #e3d3c5;
    border-radius: 0.75rem;
    background: linear-gradient(180deg, #fffaf4 0%, #fbeee2 100%);
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.pt-ns-card[hidden] {
    display: none;
}

.pt-ns-card:hover {
    transform: translateY(-0.125rem);
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.08);
    border-color: #d1a77f;
}

.pt-ns-card__icon {
    font-size: 2rem;
    line-height: 1;
}

.pt-ns-card__name {
    font-weight: 700;
    font-size: 1rem;
    color: #4a3123;
}

.pt-ns-card__reading {
    font-size: 0.72rem;
    color: #8a6a55;
}

.pt-ns-card__role {
    font-size: 0.78rem;
    color: #6b5546;
    line-height: 1.5;
}

/* ---------- 詳細ページ ---------- */
.pt-ns-detail-role {
    font-size: 1.05rem;
    color: #555;
    margin-bottom: 0.75rem;
}

.pt-ns-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}

.pt-ns-tag {
    padding: 0.15rem 0.7rem;
    border-radius: 62.5rem;
    background: #fbeee2;
    color: #8a5a35;
    font-size: 0.8rem;
    font-weight: 700;
}

.pt-ns-episodes {
    padding-left: 1.25rem;
}

.pt-ns-episodes li {
    margin-bottom: 0.6rem;
    line-height: 1.7;
}

/* ---------- 家系図: 系統の凡例 ---------- */
.pt-ns-legend {
    list-style: none;
    margin: 0.75rem 0 1.25rem;
    padding: 0;
    display: grid;
    gap: 0.5rem;
}

.pt-ns-legend__item {
    display: grid;
    grid-template-columns: auto auto 1fr;
    align-items: baseline;
    column-gap: 0.5rem;
    font-size: 0.9rem;
}

.pt-ns-legend__swatch {
    display: inline-block;
    width: 0.9rem;
    height: 0.9rem;
    border-radius: 0.2rem;
    border: 0.125rem solid var(--ns-line);
    background: var(--ns-bg);
    align-self: center;
}

.pt-ns-legend__label {
    font-weight: 700;
    color: var(--ns-dark);
}

.pt-ns-legend__desc {
    color: #5c6b78;
    font-size: 0.82rem;
}

/* 系統ごとの色(凡例とツリーで共有) */
.pt-ns-legend__item--izanagi,
.pt-ns-node--izanagi {
    --ns-line: #6a9fc0;
    --ns-bg: #eef6fb;
    --ns-dark: #2a5573;
}

.pt-ns-legend__item--susanoo,
.pt-ns-node--susanoo {
    --ns-line: #6fae8a;
    --ns-bg: #eef8f2;
    --ns-dark: #2a6144;
}

.pt-ns-legend__item--amaterasu,
.pt-ns-node--amaterasu {
    --ns-line: #d9a04c;
    --ns-bg: #fdf4e3;
    --ns-dark: #7a4c0d;
}

/* ---------- 家系図: 縦に伸びるアウトライン型ツリー ---------- */
.pt-ns-tree {
    padding: 1rem 0 1.5rem;
}

.pt-ns-tree-root {
    margin-bottom: 1rem;
}

.pt-ns-node__box {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    column-gap: 0.5rem;
    max-width: 100%;
    padding: 0.3rem 0.75rem;
    border: 0.125rem solid var(--ns-line);
    border-radius: 0.9rem;
    background: var(--ns-bg);
}

.pt-ns-node__icon {
    font-size: 0.95rem;
    line-height: 1;
}

.pt-ns-node__name {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--ns-dark);
}

.pt-ns-node__name--link {
    text-decoration: none;
}

.pt-ns-node__name--link:hover {
    text-decoration: underline;
}

.pt-ns-node__note {
    flex-basis: 100%;
    font-size: 0.75rem;
    color: #5c6b78;
    line-height: 1.5;
}

.pt-ns-node__children {
    list-style: none;
    margin: 0.4rem 0 0;
    padding: 0 0 0 1.1rem;
    border-left: 0.125rem solid var(--ns-line);
}

.pt-ns-node__children > li {
    position: relative;
    padding: 0.4rem 0 0.4rem 0.9rem;
}

.pt-ns-node__children > li::before {
    content: "";
    position: absolute;
    top: 1.1rem;
    left: 0;
    width: 0.75rem;
    height: 0.125rem;
    background: var(--ns-line);
}

/* ---------- 名場面 ---------- */
.pt-ns-toc {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
    margin: 1rem 0 1.5rem;
    padding: 0;
    list-style: none;
    font-size: 0.9rem;
}

.pt-ns-story {
    margin-bottom: 1.75rem;
}

.pt-ns-story__summary {
    color: #555;
}

.pt-ns-story__points {
    padding-left: 1.25rem;
}

.pt-ns-story__points li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.pt-ns-story__gods {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.pt-ns-story__gods-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #5c6b78;
}

/* ---------- 見比べ ---------- */
.pt-ns-callout {
    margin: 1.25rem 0;
    padding: 0.9rem 1.1rem;
    border-left: 0.3rem solid #d9a04c;
    border-radius: 0.5rem;
    background: #fdf4e3;
    line-height: 1.7;
}

.pt-ns-cmp {
    margin-bottom: 2rem;
}

.pt-ns-cmp__list {
    display: grid;
    gap: 0.6rem;
    margin: 1rem 0;
}

.pt-ns-cmp__item {
    padding: 0.75rem 1rem;
    border: 0.0625rem solid #e3d3c5;
    border-radius: 0.75rem;
    background: #fffaf4;
}

.pt-ns-cmp__name {
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
}

.pt-ns-cmp__point {
    margin-left: 0.6rem;
    padding: 0.1rem 0.6rem;
    border-radius: 62.5rem;
    background: #fbeee2;
    color: #8a5a35;
    font-size: 0.78rem;
    font-weight: 700;
}

.pt-ns-cmp__reason {
    margin: 0.4rem 0 0;
    line-height: 1.7;
}

.pt-ns-role-table th {
    white-space: nowrap;
}
