/* =========================================================
   soraniar 一覧ページ (featured-list.html / news-list.html) 専用
   soraniar-ui.css のあとに読み込むこと
   ========================================================= */

body.sn-list {
    background:
            radial-gradient(circle at 50% -8%, rgba(104, 199, 244, .28), transparent 30rem),
            #eef8fd;
}

.sn-shell {
    width: min(100%, 1220px);
    margin: 0 auto;
    min-height: 100dvh;
    background: #fff;
    box-shadow: 0 0 70px rgba(40, 100, 140, .08);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.sn-wrap {
    width: min(calc(100% - 36px), var(--content));
    margin-inline: auto;
}

/* ---------------------------------------------------------
   ヘッダー
   --------------------------------------------------------- */
.sn-list-header {
    position: relative;
    z-index: 10;
    padding: calc(14px + var(--safe-top)) max(18px, calc((100% - var(--content)) / 2)) 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.sn-list-header .sn-brand-mark { width: 34px; height: 27px; }
.sn-list-header .sn-brand-name { font-size: 1.6rem; }

/* ---------------------------------------------------------
   ページ見出し
   --------------------------------------------------------- */
.sn-list-main { flex: 1; padding-bottom: 48px; }

.sn-back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 20px 0 4px;
    color: var(--sky-deep);
    font-weight: 800;
    font-size: .88rem;
    text-decoration: none;
}

.sn-back-link:hover { text-decoration: underline; }

.sn-list-title {
    margin: 8px 0 6px;
    font-size: clamp(1.5rem, 6vw, 2.2rem);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.sn-list-lead {
    margin: 0 0 24px;
    color: var(--muted);
    font-size: .92rem;
}

/* ---------------------------------------------------------
   カードグリッド
   --------------------------------------------------------- */
.sn-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
    padding-bottom: 8px;
}

.sn-list-card {
    display: flex;
    flex-direction: column;
    text-align: left;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    border: 1px solid #edf4f8;
    transition: transform .18s ease, box-shadow .18s ease;
}

.sn-list-card:active { transform: scale(.99); }

@media (hover: hover) {
    .sn-list-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow);
    }
}

.sn-list-card .sn-thumb { aspect-ratio: 16 / 10; }

.sn-list-card-body {
    padding: 14px 16px 18px;
    display: grid;
    gap: 6px;
    flex: 1;
    align-content: start;
}

.sn-list-card-body h2 {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.45;
}

.sn-list-card-body p {
    margin: 0;
    color: var(--muted);
    font-size: .86rem;
    line-height: 1.55;
}

.sn-list-card-body .sn-place {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.sn-list-card-body .sn-place svg {
    width: 11px;
    height: 13px;
    color: var(--coral);
    flex-shrink: 0;
}

/* 場所名は必ず1行。長くても折り返さず「…」で切る */
.sn-list-card-body .sn-place span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/*
   最新情報一覧は、どのカードも縦幅をそろえる。

   グリッドは同じ行の中でしか高さを合わせないので、見出しが1行のカードと
   2行のカードが別の行に来ると段差ができる。見出しに2行ぶんの高さを
   常に確保し、場所名を1行に固定することで、全カードの高さが一致する。
*/
body[data-list="news"] .sn-list-card-body h2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    /* h2 の line-height は 1.45。2行ぶんを最低値にする */
    min-height: calc(1.45em * 2);
}

.sn-list-meta {
    margin-top: 2px;
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 999px;
    background: #edf4f9;
    color: var(--muted);
    font-size: .76rem;
    font-weight: 800;
    justify-self: start;
}

/* 「Nスポット」と「スタンプ n/m」を横に並べる受け皿。
   .sn-list-card-body は grid なので、包まないと縦に積まれてしまう */
.sn-list-metas {
    margin-top: 2px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    justify-self: start;
}

.sn-list-metas .sn-list-meta { margin-top: 0; }

/* ---------------------------------------------------------
   スタンプラリー
   --------------------------------------------------------- */

/* 特集一覧のカードに出す進捗チップ */
.sn-stamp-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 999px;
    background: #fff1e6;
    color: #b4531b;
    font-size: .76rem;
    font-weight: 800;
    border: 1px solid #ffd9bd;
}

.sn-stamp-chip.is-complete {
    background: var(--coral, #ff6b6f);
    border-color: transparent;
    color: #fff;
}

/* 撮影済みスポットの判子。
   写真ではなく、スポット名などの文字の上に押す（紙の書類に押した見た目）。
   画像は特集ごとに差し替わる（featuredSpotHd.stampImage）ので、
   枠や背景はこちらで持たず、画像そのものにデザインを任せる。 */
.sn-list-card-body { position: relative; }

.sn-stamp-mark {
    position: absolute;
    top: 50%;
    right: 12px;
    z-index: 2;
    /* 判子の中の絵柄（文字）が読める程度の大きさにする。
       小さくしすぎると、ただの丸にしか見えなくなる */
    width: 58px;
    height: 58px;
    object-fit: contain;
    /* 手で押した判子らしく少し傾ける */
    transform: translateY(-50%) rotate(-12deg);
    /* 四角い背景を付けずに影を落とす（透過PNGの形に沿う） */
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .3));
    /* 文字の上に重なるので、タップの邪魔をしないようにする */
    pointer-events: none;
}

@media (max-width: 380px) {
    .sn-stamp-mark { width: 48px; height: 48px; }
}

/* NEWバッジ（最新情報の先頭のみ） */
.sn-new-flag {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    background: var(--yellow);
    color: var(--ink);
    font-size: .64rem;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 999px;
    letter-spacing: .04em;
}

/* ---------------------------------------------------------
   読み込み中 / 空 / エラー
   --------------------------------------------------------- */
.sn-list-state {
    padding: 48px 20px;
    text-align: center;
    color: var(--muted);
    font-size: .92rem;
}

.sn-list-state[hidden] { display: none; }

.sn-list-state .sn-spinner-sm {
    width: 28px;
    height: 28px;
    margin: 0 auto 12px;
    border: 3px solid var(--line);
    border-top-color: var(--sky-deep);
    border-radius: 50%;
    animation: sn-spin .8s linear infinite;
}

@keyframes sn-spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------
   フッター
   --------------------------------------------------------- */
.sn-footer {
    padding: 36px 20px calc(32px + var(--safe-bottom));
    text-align: center;
    color: var(--ink);
    background: linear-gradient(180deg, #e7f8ff, #bde9fb);
}

.sn-footer p { margin: 4px; font-size: .88rem; }

@media (max-width: 520px) {
    .sn-wrap { width: calc(100% - 28px); }
    .sn-list-grid { grid-template-columns: 1fr; gap: 14px; }
    .sn-list-card { flex-direction: row; align-items: stretch; }
    .sn-list-card .sn-thumb { width: 116px; flex-shrink: 0; aspect-ratio: auto; }
    .sn-list-card-body { padding: 12px 14px; }
}
