:root {
  --oy-primary: #1f2b4e;
  --oy-primary-soft: #e7edf9;
  --oy-primary-hover: #2457a6;
  --oy-border: #dde3f0;
  --oy-border-soft: #e7ecf5;
  --oy-bg-soft: #f4f6fb;
  --oy-muted: #6b7280;
}

.om-pg-root {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  color: #0f172a;
}

.om-pg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.om-pg-swipe-hint {
  display: none;
  font-size: 11px;
  color: var(--oy-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 2px 0 10px 0;
}

.om-pg-filter {
  margin-bottom: 12px;
}

.om-pg-filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.om-pg-filter-chip,
.om-pg-filter-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--oy-border);
  padding: 4px 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--oy-primary);
  text-decoration: none;
  background: #fff;
}

.om-pg-filter-chip:focus,
.om-pg-filter-reset:focus,
.om-pg-badge:focus {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.om-pg-filter-chip.is-active {
  background: var(--oy-primary);
  border-color: var(--oy-primary);
  color: #fff;
}

.om-pg-card {
  background: #fff;
  border: 1px solid var(--oy-border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.om-pg-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
}

.om-pg-card.is-important {
  border-color: #f59e0b;
  box-shadow: 0 16px 36px rgba(245, 158, 11, 0.2);
}

.om-pg-image {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--oy-bg-soft);
  overflow: hidden;
}

.om-pg-image-link {
  display: block;
  width: 100%;
  height: 100%;
}

.om-pg-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.om-pg-image-fallback {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e7edf9, #cbd5f3);
}

.om-pg-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--badge-color, var(--oy-primary));
  color: #fff;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.2);
  text-decoration: none;
}

.om-pg-new-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #10b981;
  color: #fff;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 8px 18px rgba(16, 185, 129, 0.2);
}

.om-pg-content {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.om-pg-meta {
  font-size: 11px;
  color: var(--oy-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.om-pg-dot {
  font-size: 10px;
  opacity: 0.6;
}

.om-pg-source {
  font-weight: 600;
}

.om-pg-title {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  color: var(--oy-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.om-pg-title a {
  color: inherit;
  text-decoration: none;
}

.om-pg-title a:hover {
  color: var(--oy-primary-hover);
}

.om-pg-excerpt {
  margin: 0;
  color: #374151;
  font-size: 13px;
  line-height: 1.5;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.om-pg-btn {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--oy-border);
  padding: 4px 14px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--oy-primary);
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.om-pg-btn:hover {
  background: var(--oy-primary-soft);
  border-color: var(--oy-primary-soft);
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.12);
}

.om-pg-empty {
  color: var(--oy-muted);
}

@media (max-width: 768px) {
  .om-pg-swipe-hint {
    display: block;
    margin: 2px 0 6px 0;
  }

  .om-pg-filter {
    margin-bottom: 8px;
  }

  .om-pg-filter-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-right: -16px;
    padding-right: 16px;
    gap: 6px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    position: relative;
  }

  .om-pg-filter-row::-webkit-scrollbar {
    display: none;
  }

  .om-pg-filter-chip {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 3px 10px;
    font-size: 10px;
  }

  .om-pg-filter-row::after {
    content: '';
    position: sticky;
    right: 0;
    top: 0;
    width: 28px;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,0.95));
    pointer-events: none;
    align-self: stretch;
  }

  .om-pg-grid {
    grid-auto-flow: column;
    grid-auto-columns: minmax(78%, 1fr);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
    scrollbar-width: none;
  }

  .om-pg-grid::-webkit-scrollbar {
    display: none;
  }

  .om-pg-archive .om-pg-grid {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    overflow-x: visible;
    scroll-snap-type: none;
    padding-bottom: 0;
  }

  .om-pg-card {
    scroll-snap-align: start;
  }

  .om-pg-root {
    position: relative;
  }

  .om-pg-grid::after {
    content: '';
    position: sticky;
    right: 0;
    top: 0;
    width: 40px;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,0.95));
    pointer-events: none;
    align-self: stretch;
  }

  .om-pg-archive .om-pg-grid::after {
    display: none;
  }
}

.om-pg-pagination {
  margin-top: 16px;
}

.om-pg-pagination ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.om-pg-pagination a,
.om-pg-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--oy-border);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--oy-primary);
}

.om-pg-pagination .current {
  background: var(--oy-primary);
  border-color: var(--oy-primary);
  color: #fff;
}

.om-pg-no-image .om-pg-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.om-pg-no-image .om-pg-card {
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.om-pg-no-image.om-pg-has-1 .om-pg-grid {
  justify-items: start;
}

.om-pg-no-image.om-pg-has-1 .om-pg-card {
  max-width: 560px;
  width: 100%;
}

.om-pg-no-image .om-pg-content {
  padding: 12px 14px 14px;
  gap: 6px;
}

.om-pg-no-image .om-pg-meta {
  font-size: 10px;
}

.om-pg-no-image .om-pg-title {
  font-size: 15px;
}

.om-pg-no-image .om-pg-excerpt {
  -webkit-line-clamp: 2;
}

.om-pg-no-image .om-pg-btn {
  font-size: 11px;
  padding: 3px 12px;
}
