:root {
  color-scheme: light;
  --bg: #f7f7f3;
  --surface: #ffffff;
  --ink: #171417;
  --muted: #69636a;
  --line: #ddd8d2;
  --accent: #e93d5b;
  --accent-strong: #cf1e45;
  --mint: #27c7b8;
  --sun: #f3b43f;
  --shadow: 0 16px 40px rgba(23, 20, 23, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(120deg, rgba(233, 61, 91, 0.1), transparent 34rem),
    linear-gradient(280deg, rgba(39, 199, 184, 0.14), transparent 30rem),
    var(--bg);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 0.85rem clamp(1rem, 4vw, 2rem);
  background: rgba(247, 247, 243, 0.88);
  border-bottom: 1px solid rgba(221, 216, 210, 0.78);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-photo {
  display: block;
  width: 2.65rem;
  height: 2.65rem;
  flex: 0 0 auto;
  background: #101014;
  border-radius: 0.7rem;
  box-shadow: 0 8px 22px rgba(16, 16, 20, 0.2);
  overflow: hidden;
}

.brand-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-copy {
  display: grid;
  min-width: 0;
  line-height: 1.1;
}

.brand-copy strong {
  overflow: hidden;
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy span {
  color: var(--muted);
  font-size: 0.82rem;
}

.channel-link,
.profile-link,
.refresh-button,
.filter-chip,
.short-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  border-radius: 0.7rem;
  text-decoration: none;
  font-weight: 800;
}

.channel-link {
  padding: 0 1rem;
  color: #ffffff;
  background: var(--accent);
}

.page-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: clamp(1rem, 4vw, 2rem);
}

.search-section {
  display: grid;
  gap: 1.15rem;
  padding: clamp(1rem, 4vw, 2rem) 0 1.4rem;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  gap: clamp(1rem, 4vw, 2rem);
}

.title-block {
  display: grid;
  gap: 0.35rem;
}

.kicker {
  margin: 0;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  max-width: 12ch;
  margin: 0;
  font-size: 3rem;
  line-height: 0.98;
  letter-spacing: 0;
}

.profile-link {
  width: fit-content;
  max-width: 100%;
  margin-top: 0.7rem;
  padding: 0 1rem;
  color: #101014;
  background: rgba(39, 199, 184, 0.16);
  border: 1px solid rgba(39, 199, 184, 0.42);
}

.search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  width: 100%;
}

.search-box input {
  width: 100%;
  min-height: 3.55rem;
  padding: 0 1.1rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  box-shadow: var(--shadow);
  outline: none;
}

.search-box input:focus {
  border-color: var(--mint);
  box-shadow: 0 0 0 4px rgba(39, 199, 184, 0.17), var(--shadow);
}

.refresh-button {
  min-width: 8rem;
  padding: 0 1.05rem;
  color: #ffffff;
  background: #101014;
  border: 0;
  cursor: pointer;
}

.refresh-button[disabled] {
  cursor: wait;
  opacity: 0.6;
}

.toolbar {
  display: flex;
  gap: 0.55rem;
  overflow-x: auto;
  padding-bottom: 0.1rem;
  scrollbar-width: none;
}

.toolbar::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  flex: 0 0 auto;
  padding: 0 1rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  cursor: pointer;
}

.filter-chip.is-active {
  color: #101014;
  background: var(--sun);
  border-color: rgba(16, 16, 20, 0.12);
}

.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.95rem 1rem;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(221, 216, 210, 0.78);
  border-radius: 0.85rem;
}

.status-bar div {
  display: grid;
  min-width: 0;
  gap: 0.2rem;
}

.status-bar strong,
.status-bar span {
  overflow-wrap: anywhere;
}

.status-bar strong {
  font-size: 0.95rem;
}

.status-bar span {
  color: var(--muted);
  font-size: 0.82rem;
}

.status-pill {
  flex: 0 0 auto;
  padding: 0.4rem 0.65rem;
  color: #ffffff !important;
  background: var(--accent);
  border-radius: 999px;
  font-weight: 900;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  gap: 1rem;
}

.product-card {
  display: grid;
  min-width: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(221, 216, 210, 0.95);
  border-radius: 0.85rem;
  box-shadow: 0 12px 28px rgba(23, 20, 23, 0.08);
}

.product-main {
  display: grid;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.product-main:focus-visible,
.short-link:focus-visible,
.refresh-button:focus-visible,
.filter-chip:focus-visible,
.profile-link:focus-visible,
.channel-link:focus-visible {
  outline: 4px solid rgba(39, 199, 184, 0.28);
  outline-offset: 3px;
}

.thumb-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #101014;
}

.thumb-wrap::after {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  padding: 0.32rem 0.55rem;
  color: #ffffff;
  background: rgba(16, 16, 20, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  content: "Short";
  font-size: 0.72rem;
  font-weight: 900;
}

.thumb-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
}

.product-card:hover .thumb-wrap img {
  transform: scale(1.035);
}

.product-info {
  display: grid;
  min-width: 0;
  gap: 0.55rem;
  padding: 0.95rem;
}

.product-date {
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.product-title {
  display: -webkit-box;
  min-height: 3.9rem;
  overflow: hidden;
  font-size: 1.05rem;
  line-height: 1.24;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.product-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  min-height: 2.5rem;
  padding: 0 0.85rem;
  color: #ffffff;
  background: var(--accent);
  border-radius: 0.65rem;
  font-weight: 900;
}

.short-link {
  min-height: 2.75rem;
  margin: 0 0.95rem 0.95rem;
  color: #101014;
  background: rgba(39, 199, 184, 0.16);
  border: 1px solid rgba(39, 199, 184, 0.36);
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 0.3rem;
  margin-top: 1rem;
  padding: 2rem 1rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.78);
  border: 1px dashed var(--line);
  border-radius: 0.85rem;
  text-align: center;
}

.empty-state strong {
  color: var(--ink);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1120px, calc(100% - 2rem));
  margin: 1rem auto 0;
  padding: 1.1rem 0 1.6rem;
  color: var(--muted);
  border-top: 1px solid rgba(221, 216, 210, 0.95);
  font-size: 0.88rem;
}

.site-footer span,
.site-footer a {
  overflow-wrap: anywhere;
}

.site-footer a {
  color: var(--accent-strong);
  font-weight: 900;
  text-decoration: none;
}

.skeleton-card {
  min-height: 21rem;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0))
      0 0 / 12rem 100% no-repeat,
    linear-gradient(#e4ded8, #e4ded8) 0 0 / 100% 58% no-repeat,
    linear-gradient(#ffffff, #ffffff);
  border: 1px solid rgba(221, 216, 210, 0.95);
  border-radius: 0.85rem;
  animation: shimmer 1.2s linear infinite;
}

@keyframes shimmer {
  to {
    background-position:
      130% 0,
      0 0,
      0 0;
  }
}

@media (max-width: 720px) {
  .site-header {
    padding: 0.75rem 0.9rem;
  }

  .brand-photo {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.65rem;
  }

  .brand-copy strong {
    max-width: 11rem;
  }

  .channel-link {
    min-height: 2.45rem;
    padding: 0 0.8rem;
  }

  .page-shell {
    padding: 1rem;
  }

  h1 {
    max-width: 11ch;
    font-size: 2.25rem;
  }

  .search-box {
    grid-template-columns: 1fr;
  }

  .refresh-button {
    width: 100%;
  }

  .status-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .thumb-wrap {
    aspect-ratio: 16 / 9;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    width: calc(100% - 2rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
