@layer components {
  /* ── List view ─────────────────────────────────────────────── */

  .list-sort {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 20px 12px;
    position: relative;
    border-bottom: 1px solid var(--rule);
    flex-shrink: 0;
  }

  .list-count {
    font-size: 12px;
    color: var(--text-3, #6B8055);
    font-weight: 500;
    letter-spacing: 0.02em;
  }

  .sort-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--primary);
    padding: 6px 4px;
    background: transparent;
    border: none;
    cursor: pointer;
  }

  .sort-btn strong { font-weight: 600; }

  .sort-menu {
    position: absolute;
    right: 16px;
    top: 100%;
    margin-top: 4px;
    background: var(--surface);
    border-radius: 10px;
    border: 1px solid var(--rule);
    box-shadow: 0 8px 24px rgba(31, 58, 95, 0.16);
    z-index: 10;
    min-width: 180px;
    padding: 4px;
  }

  .sort-menu button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 12px;
    text-align: left;
    font-size: 14px;
    border-radius: 6px;
    color: var(--primary);
    background: transparent;
    border: none;
    cursor: pointer;
  }

  .sort-menu button:hover { background: rgba(31, 58, 95, 0.06); }

  /* ── Place card ────────────────────────────────────────────── */

  .list-scroll {
    flex: 1;
    overflow-y: auto;
    background: var(--bg);
  }

  .list-cards {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--rule);
  }

  .poi-card {
    display: flex;
    gap: 14px;
    padding: 14px 18px;
    min-height: 72px;
    background: var(--surface);
    cursor: pointer;
    transition: background 0.12s;
    text-decoration: none;
    color: inherit;
  }

  .poi-card:hover { background: #f8f2dc; }

  .poi-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
  }

  .poi-body { flex: 1; min-width: 0; }

  .poi-name {
    font-family: "Fraunces", serif;
    font-weight: 500;
    font-size: 17px;
    margin: 0;
    line-height: 1.15;
    color: var(--primary);
    letter-spacing: -0.005em;
  }

  .poi-meta {
    font-size: 12px;
    color: var(--text-3, #6B8055);
    margin: 2px 0 6px;
  }

  .poi-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
  }

  .poi-fav-wrap {
    display: flex;
    align-items: flex-start;
  }

  .fav-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: none;
    background: transparent;
    cursor: pointer;
  }

  .fav-btn:hover { background: rgba(0, 0, 0, 0.04); }

  /* ── Badge ─────────────────────────────────────────────────── */

  .badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 500;
    border-radius: 100px;
    background: rgba(31, 58, 95, 0.08);
    color: var(--primary);
    white-space: nowrap;
  }

  .badge-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
  }

  .badge-open { background: rgba(72, 163, 72, 0.12); color: #2a7a2a; }
  .badge-closed { background: rgba(180, 50, 50, 0.10); color: #8b2020; }

  /* ── Skeleton ──────────────────────────────────────────────── */

  .place-card-skeleton {
    display: flex;
    gap: 14px;
    padding: 14px 18px;
    min-height: 72px;
    background: var(--surface);
    border-bottom: 1px solid var(--rule);
  }

  .skeleton-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--rule);
    flex-shrink: 0;
    animation: shimmer 1.4s linear infinite;
    background: linear-gradient(90deg, var(--rule) 25%, #d8e6c2 50%, var(--rule) 75%);
    background-size: 200% 100%;
  }

  .skeleton-body { flex: 1; display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }

  .skeleton-line {
    height: 12px;
    border-radius: 6px;
    animation: shimmer 1.4s linear infinite;
    background: linear-gradient(90deg, var(--rule) 25%, #d8e6c2 50%, var(--rule) 75%);
    background-size: 200% 100%;
  }

  .skeleton-line-wide   { width: 70%; height: 16px; }
  .skeleton-line-medium { width: 50%; }
  .skeleton-line-narrow { width: 35%; height: 10px; border-radius: 100px; }

  @keyframes shimmer {
    from { background-position: 200% 0; }
    to   { background-position: -200% 0; }
  }

  /* ── Empty state ───────────────────────────────────────────── */

  .list-empty {
    padding: 40px 32px;
    text-align: center;
    background: var(--bg);
    overflow-y: auto;
  }

  .le-illu { margin: 0 auto 18px; }

  .le-title {
    font-family: "Fraunces", serif;
    font-weight: 500;
    font-size: 20px;
    color: var(--primary);
    margin: 0 0 6px;
  }

  .le-sub {
    font-size: 13px;
    color: var(--text-3, #6B8055);
    margin: 0 0 20px;
  }

  /* ── Login invitation inline ───────────────────────────────── */

  .list-login-invite {
    font-size: 12px;
    color: var(--text-3, #6B8055);
    margin-top: 2px;
    display: block;
  }
}
