/* ========================================
   user-n100k-dic.css
   ユーザー閲覧画面スタイル（n100ku- 接頭辞）
======================================== */

.n100ku-container {
    max-width: 1200px;
    margin: 0 auto;
    font-family: sans-serif;
    color: #333;
    background: #f0e8dc;
    border-radius: 20px;
    padding: 16px;
    box-sizing: border-box;
}

/* ══════════════════════════════════════
   上段レイアウト：検索行＋薄茶色フィルターパネル（全幅）
══════════════════════════════════════ */
.n100ku-top-row {
    margin-bottom: 20px;
}

/* ── ヒーロー画像（ご案内＋検索バーをオーバーレイ） ── */
.n100ku-hero {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 14px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.10);
}
.n100ku-hero-img {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
}
.n100ku-hero-toolbar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 18px;
}

/* ── ご案内ボタン ── */
.n100ku-info-btn {
    flex-shrink: 0;
    padding: 6px 18px;
    font-size: 0.95em;
    font-weight: bold;
    border: 1.5px solid #d0d0d0;
    border-radius: 28px;
    background: #fff;
    color: #555;
    cursor: pointer;
    box-shadow: 0 1px 5px rgba(0,0,0,0.07);
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.n100ku-info-btn:hover { background: #f5f5f5; border-color: #bbb; }
.n100ku-info-btn:active { background: #ececec; }

/* ── 検索バー ── */
.n100ku-search-box {
    display: block;
    flex: 1 1 0;
    min-width: 0;
    width: 100%;
    padding: 6px 48px 6px 18px;
    font-size: 1.05em;
    border: 1.5px solid #d0d0d0;
    border-radius: 28px;
    box-sizing: border-box;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23aaa' stroke-width='2.5'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") calc(100% - 16px) center / 18px no-repeat;
    box-shadow: 0 1px 5px rgba(0,0,0,0.07);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    color: #333;
}
.n100ku-search-box::placeholder { color: #bbb; }
.n100ku-search-box:focus {
    border-color: #90bce8;
    box-shadow: 0 1px 8px rgba(74,144,226,0.18);
}

/* ── 薄茶色フィルターパネル ── */
.n100ku-filter-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: #f0e8dc;
    padding: 12px 16px 16px;
}

/* 各列：縦線なし */
.n100ku-filter-col {
    min-width: 0;
}

/* 列タイトル */
.n100ku-filter-col-title {
    font-size: 0.85em;
    font-weight: bold;
    color: #5c4a2a;
    margin-bottom: 6px;
}

/* タイトル下の横線（端から端まで・縦線なし） */
.n100ku-filter-col-line {
    border: none;
    border-top: 1.5px solid #d9c9b5;
    margin: 0 0 10px 0;
}

/* ── 現在選択中のフィルター表示（検索バーの入力を忘れて件数が少ないと誤解しないための表示） ── */
.n100ku-active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 10px 4px;
    font-size: 0.86em;
}
.n100ku-active-filter-label {
    color: #999;
    font-weight: bold;
    margin-right: 2px;
}
.n100ku-active-filter-chip {
    display: inline-block;
    background: #fdf6ea;
    border: 1px solid #e6d9c2;
    color: #5c4a2a;
    font-weight: bold;
    padding: 3px 10px;
    border-radius: 999px;
}

/* ── ご案内ポップ ── */
.n100ku-info-overlay-bg {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 10001;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}
.n100ku-info-overlay-bg.n100ku-show { display: flex; }
.n100ku-info-overlay-inner {
    position: relative;
    background: #fff;
    border-radius: 10px;
    width: 100%;
    max-width: 420px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 22px 24px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
    box-sizing: border-box;
}
.n100ku-info-overlay-close {
    position: absolute;
    top: 10px; right: 12px;
    background: none;
    border: none;
    font-size: 1.15em;
    color: #888;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.15s, color 0.15s;
}
.n100ku-info-overlay-close:hover { background: #f0f0f0; color: #333; }
.n100ku-info-overlay-title {
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

/* ── 店舗フィルター（表題＋ボタンを一行で表示） ── */
.n100ku-store-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}
.n100ku-store-row .n100ku-filter-col-title {
    margin-bottom: 0;
    white-space: nowrap;
}
.n100ku-store-filter-wrap {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* ── カテゴリーフィルター（5列グリッド・均一サイズ・大分類タイル） ── */
.n100ku-category-filter-wrap {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(max(96px, calc((100% - 32px) / 5)), 1fr));
    gap: 8px;
}

/* ── フィルターボタン共通 ── */
.n100ku-store-btn,
.n100ku-category-btn {
    font-size: 0.85em;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    user-select: none;
    font-weight: normal;
    text-align: center;
}

/* 店舗ボタン：ピル型 */
.n100ku-store-btn {
    padding: 6px 10px;
    border-radius: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* カテゴリーボタン：絵文字＋ラベルのタイル型（大分類） */
.n100ku-category-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 4px 9px;
    border-radius: 14px;
    box-shadow: 0 2px 5px rgba(80, 60, 30, 0.06);
    min-width: 0;
}
.n100ku-category-btn .n100ku-category-icon {
    font-size: 1.35em;
    line-height: 1;
}
.n100ku-category-btn .n100ku-category-label {
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.n100ku-store-btn:hover,
.n100ku-category-btn:hover  { background: #f5f5f5; }
.n100ku-store-btn.n100ku-filter-active    { background: #5c4a2a; color: #fff; border-color: #5c4a2a; }
.n100ku-category-btn.n100ku-filter-active { background: #6c5ce7; color: #fff; border-color: #6c5ce7; }

/* ── カテゴリー詳細アコーディオン（大分類説明＋小分類タブ） ── */
.n100ku-category-detail {
    margin-top: 12px;
    background: #fff;
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 2px 6px rgba(80, 60, 30, 0.08);
    box-sizing: border-box;
}
.n100ku-category-detail[hidden] { display: none; }
.n100ku-category-desc {
    font-size: 0.85em;
    color: #5c4a2a;
    line-height: 1.6;
    margin: 0 0 10px 0;
}
.n100ku-category-tabbar {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
}
.n100ku-category-tab {
    font-size: 0.85em;
    font-weight: bold;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.n100ku-category-tab:hover { background: #f5f5f5; }
.n100ku-category-tab-active { color: #fff; }

/* カード一覧の一番下に複製表示する小分類タブバー（説明文なし・切替の手間削減用） */
.n100ku-category-tabbar-bottom {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px dashed #ddd;
}

/* ── テキスト案内エリア ── */
.n100ku-info-area {
    font-size: 0.85em;
    color: #444;
    line-height: 1.7;
    white-space: pre-line;
}

.n100ku-result-grid { margin-top: 8px; }
.n100ku-no-result { color: #999; padding: 20px; text-align: center; }

/* ══════════════════════════════════════
   掲示板（件数＋新着アイテム）
══════════════════════════════════════ */
.n100ku-board {
    background: #fff;
    border: 1px solid #e6dcc8;
    border-radius: 14px;
    padding: 18px 20px 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.n100ku-board-count {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 1px dashed #ddd;
}
.n100ku-board-pin { font-size: 1.05em; }
.n100ku-board-num {
    font-size: 1.6em;
    font-weight: 800;
    color: #5c4a2a;
    font-variant-numeric: tabular-nums;
}
.n100ku-board-label { font-size: 0.85em; color: #666; }

.n100ku-board-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.95em;
    font-weight: bold;
    color: #333;
    margin-bottom: 12px;
}

.n100ku-new-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.n100ku-new-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s;
    position: relative;
}
.n100ku-new-item:hover { background: #faf7f2; }

.n100ku-new-thumb {
    width: 150px; height: 150px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f2f2f2;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4em;
}
.n100ku-new-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 右側：日付 → 大分類名 → 小分類名 → 用語名 の縦並び */
.n100ku-new-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.n100ku-new-date { font-size: 0.75em; color: #999; }
.n100ku-new-cat1 { font-size: 0.8em; font-weight: bold; color: #5c4a2a; }
.n100ku-new-badge {
    align-self: flex-start;
    font-size: 0.72em;
    font-weight: bold;
    color: #fff;
    padding: 1px 7px;
    border-radius: 4px;
}
.n100ku-new-name {
    font-size: 0.98em;
    font-weight: bold;
    color: #232323;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.n100ku-new-new-tag {
    position: absolute;
    top: 8px;
    right: 8px;
    flex-shrink: 0;
    font-size: 0.68em;
    font-weight: bold;
    color: #fff;
    background: #e2604f;
    padding: 2px 7px;
    border-radius: 999px;
}

/* PC表示：2列×2行のグリッド（4件表示。右側の空白を解消） */
@media (min-width: 769px) {
    .n100ku-new-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px 18px;
    }
}


/* ══════════════════════════════════════
   商品カード
══════════════════════════════════════ */
.n100ku-term-item { padding: 18px; border: 1px solid #eee; border-radius: 6px; background: #fff; margin-bottom: 16px; box-shadow: 0 2px 4px rgba(0,0,0,0.02); display: flex; gap: 18px; align-items: flex-start; justify-content: space-between; }
.n100ku-card-left  { flex: 2; min-width: 0; }
.n100ku-card-right { flex: 1; max-width: 300px; width: 100%; padding: 12px; box-sizing: border-box; }
.n100ku-term-item.n100ku-no-right .n100ku-card-left  { flex: 1; }
.n100ku-term-item.n100ku-no-right .n100ku-card-right { display: none !important; }
.n100ku-term-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.n100ku-term-cat-badge { color: #fff; padding: 2px 8px; border-radius: 4px; font-size: 0.78em; font-weight: bold; }
.n100ku-title-wrap { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.n100ku-term-title { font-size: 1.25em; font-weight: bold; margin: 0; color: #232323; line-height: 1.2; }
.n100ku-term-yomi  { font-size: 0.85em; color: #666; }
.n100ku-card-info-table { width: 100%; border-collapse: collapse; margin: 8px 0 12px; font-size: 0.9em; }
.n100ku-card-info-table th, .n100ku-card-info-table td { border: 1px solid #e0e0e0; padding: 6px 10px; text-align: left; vertical-align: middle; }
.n100ku-card-info-table th { background: #f5f5f5; color: #333; font-weight: bold; white-space: nowrap; width: 1%; }
.n100ku-card-info-table td { color: #444; }
.n100ku-card-filter-link { cursor: pointer; color: #2c5f8a; text-decoration: underline dotted; transition: color 0.15s; }
.n100ku-card-filter-link:hover { color: #1a3d5e; }
.n100ku-term-note { padding: 10px 14px; background: #fff5f5; border-radius: 4px; color: #c0392b; font-size: 0.9em; line-height: 1.5; margin-top: 6px; }
.n100ku-card-divider-note     { border: 0; border-top: 1px solid #eee; margin: 8px 0 6px; }
.n100ku-card-divider-articles { border: 0; border-top: 1px solid #ddd; margin: 12px 0 8px; }
.n100ku-term-rel  { font-size: 0.9em; color: #555; }
.n100ku-rel-label { font-size: 0.88em; font-weight: bold; color: #555; margin: 0 0 6px 0; }
.n100ku-rel-tag { display: inline-block; background: #f0f0f0; border: 1px solid #ddd; border-radius: 4px; padding: 2px 8px; margin-right: 5px; margin-bottom: 5px; font-size: 0.85em; color: #4a90e2; font-weight: bold; cursor: pointer; transition: background-color 0.1s ease; user-select: none; }
.n100ku-rel-tag:hover { background-color: #e5e9ec; color: #2475d2; }
.n100ku-articles-title { font-size: 0.95em; font-weight: bold; color: #2c3e50; margin: 0 0 8px 0; display: flex; align-items: center; gap: 5px; border-bottom: 1px solid #eee; padding-bottom: 4px; }
.n100ku-articles-list { margin: 0; padding-left: 18px; }
.n100ku-articles-list li { margin-bottom: 6px; font-size: 0.88em; line-height: 1.4; color: #333; }
.n100ku-articles-link { color: #4a90e2; text-decoration: none; font-weight: 500; word-break: break-all; }
.n100ku-articles-link:hover { text-decoration: underline; }
.n100ku-card-image-wrapper { width: 100%; margin-bottom: 12px; border-radius: 4px; overflow: hidden; border: 1px solid #eee; display: flex; justify-content: center; align-items: center; }
.n100ku-card-image { max-width: 300px; max-height: 300px; width: auto; height: auto; object-fit: contain; background: #f8f8f8; display: block; }

/* ── 画像オーバーレイ ── */
.n100ku-img-overlay-bg { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.82); z-index: 10000; justify-content: center; align-items: center; }
.n100ku-img-overlay-bg.n100ku-show { display: flex; }
.n100ku-img-overlay-inner { position: relative; max-width: 90vw; max-height: 90vh; display: flex; flex-direction: column; align-items: center; }
.n100ku-img-overlay-close { position: absolute; top: -14px; right: -14px; background: #fff; color: #333; border: none; border-radius: 50%; width: 32px; height: 32px; font-size: 1em; cursor: pointer; font-weight: bold; line-height: 1; z-index: 1; }
.n100ku-img-overlay-close:hover { background: #eee; }
.n100ku-img-overlay-img { max-width: 90vw; max-height: 80vh; object-fit: contain; border-radius: 4px; background: #fff; box-shadow: 0 4px 24px rgba(0,0,0,0.5); }
.n100ku-img-overlay-caption { color: #eee; font-size: 0.95em; margin-top: 12px; text-align: center; }

/* ── レスポンシブ ── */
@media (max-width: 768px) {
    .n100ku-term-item  { flex-direction: column; gap: 12px; }
    .n100ku-card-right { max-width: 100%; }
}
@media (max-width: 600px) {
    .n100ku-hero-img { height: 160px; }
    .n100ku-hero-toolbar { bottom: 10px; padding: 0 12px; gap: 6px; }
    .n100ku-info-btn { padding: 6px 12px; font-size: 0.88em; }
    .n100ku-category-filter-wrap { grid-template-columns: repeat(auto-fill, minmax(max(78px, calc((100% - 32px) / 5)), 1fr)); }
}