:root {
  --bg: #070b14;
  --bg-2: #0b1020;

  --panel: rgba(16, 20, 30, 0.72);
  --panel-strong: rgba(20, 25, 38, 0.88);
  --panel-soft: rgba(255, 255, 255, 0.03);

  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(124, 156, 255, 0.35);

  --text: #f5f8ff;
  --muted: rgba(245, 248, 255, 0.62);

  --accent: #7c9cff;
  --accent-2: #a78bfa;
  --accent-3: #22d3ee;

  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  --radius: 22px;
  --radius-lg: 28px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 12%, rgba(124, 156, 255, 0.16), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(167, 139, 250, 0.14), transparent 26%),
    radial-gradient(circle at 50% 100%, rgba(34, 211, 238, 0.08), transparent 25%),
    linear-gradient(180deg, #05070d 0%, #070b14 45%, #05070d 100%);
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.65), rgba(0,0,0,0.12));
  opacity: 0.22;
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  inset: -20%;
  pointer-events: none;
  background:
    conic-gradient(
      from 180deg at 50% 50%,
      rgba(124, 156, 255, 0.00),
      rgba(124, 156, 255, 0.10),
      rgba(167, 139, 250, 0.08),
      rgba(34, 211, 238, 0.05),
      rgba(124, 156, 255, 0.00)
    );
  filter: blur(60px);
  opacity: 0.45;
  animation: drift 20s linear infinite;
  z-index: -3;
}

@keyframes drift {
  0% { transform: translate3d(-2%, -1%, 0) rotate(0deg); }
  50% { transform: translate3d(2%, 1%, 0) rotate(180deg); }
  100% { transform: translate3d(-2%, -1%, 0) rotate(360deg); }
}

a {
  color: inherit;
}

button {
  border: 0;
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.14s ease, opacity 0.14s ease, background 0.14s ease, border-color 0.14s ease;
}

button:hover {
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.hidden {
  display: none !important;
}

.page {
  width: min(1360px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 32px;
  display: grid;
  grid-template-columns: minmax(280px, 330px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

/* Top bar */
.topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(19, 24, 36, 0.92), rgba(12, 15, 24, 0.88));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  position: sticky;
  top: 12px;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(124, 156, 255, 0.95), rgba(167, 139, 250, 0.9));
  box-shadow:
    0 10px 30px rgba(124, 156, 255, 0.22),
    inset 0 0 0 1px rgba(255,255,255,0.12);
  flex: 0 0 auto;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand h1 {
  margin: 0;
  font-size: 1.06rem;
  line-height: 1.1;
}

.brand p {
  margin: 4px 0 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.search-wrap {
  flex: 0 1 360px;
  width: 100%;
}

.search-box {
  position: relative;
  width: 100%;
}

#search {
  width: 100%;
  padding: 13px 42px 13px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: none;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.96rem;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

#search::placeholder {
  color: rgba(245, 248, 255, 0.42);
}

#search:focus {
  border-color: rgba(124, 156, 255, 0.62);
  box-shadow: 0 0 0 4px rgba(124, 156, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
}

#filterBtn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 10px;
  padding: 0;
  background: transparent;
  border: none;
  display: grid;
  place-items: center;
}

#filterBtn img {
  width: 18px;
  height: 18px;
  opacity: 0.72;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

#filterBtn:hover img {
  opacity: 1;
  transform: scale(1.05);
}

.filter-chip {
  padding: 8px 14px;
  border-radius: 999px;

  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: rgba(255,255,255,0.45);

  cursor: pointer;
  transition: all 0.18s ease;

  font-size: 0.85rem;
}

.filter-chip:hover {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.7);
}

.filter-chip.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  color: white;

  box-shadow:
    0 6px 18px rgba(124, 156, 255, 0.35),
    inset 0 0 8px rgba(255,255,255,0.15);
}

.help-btn {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  border: 1px solid var(--line);
  color: rgba(255,255,255,0.82);
  padding: 11px 14px;
  border-radius: 16px;
  cursor: pointer;
  white-space: nowrap;
}

.help-btn:hover {
  border-color: rgba(124, 156, 255, 0.45);
  color: white;
}

/* Left rail / hero */
.hero {
  grid-column: 1;
  grid-row: 2;
  position: sticky;
  top: 92px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(20, 25, 38, 0.92), rgba(13, 16, 25, 0.86));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.hero > div:first-child {
  padding: 0;
}

.hero h2 {
  margin: 0 0 10px;
  font-size: clamp(1.7rem, 2.8vw, 2.35rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  max-width: 36ch;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  position: relative;
}

.hero-card {
  width: 100%;
  padding: 18px 18px 16px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.025));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), transparent);
  opacity: 0.75;
}

.hero-label {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.hero-card strong {
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

.icon-btn {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 16px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  display: grid;
  place-items: center;
}

.icon-btn:hover {
  border-color: rgba(124, 156, 255, 0.42);
}

.icon-btn img {
  width: 18px;
  height: 18px;
}

.sort-wrap {
  position: relative;
}

.sort-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 230px;
  padding: 8px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background:
    linear-gradient(180deg, rgba(18, 22, 35, 0.98), rgba(13, 16, 26, 0.98));
  box-shadow: 0 20px 55px rgba(0,0,0,0.42);
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 30;
}

.sort-dropdown button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
  padding: 9px 11px;
  border-radius: 12px;
  background: transparent;
  color: rgba(255,255,255,0.88);
  border: 0;
  text-align: left;
}

.sort-dropdown button:hover {
  background: rgba(124,156,255,0.15);
}

.sort-icon {
  width: 16px;
  height: 16px;
}

main {
  grid-column: 2;
  grid-row: 2 / span 2;
  min-width: 0;
}

/* Grid / cards */
#grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(22, 27, 42, 0.96), rgba(15, 18, 28, 0.96));
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  display: flex;
  flex-direction: column;
  min-height: 225px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), transparent);
  opacity: 0.65;
}

.card:hover {
  transform: translateY(-5px);
  border-color: rgba(124, 156, 255, 0.5);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.5);
  background:
    linear-gradient(180deg, rgba(24, 30, 47, 0.98), rgba(14, 17, 26, 0.98));
}

.title-wrap {
  position: relative;
  z-index: 1;
}

.card h3 {
  margin: 0 0 8px;
  line-height: 1.18;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}

.card p.desc,
.card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.52;
}

.date {
  display: block;
  margin-top: 10px;
  margin-bottom: 14px;
  color: rgba(245,248,255,0.52);
  font-size: 0.82rem;
}

.tags {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  gap: 6px;
  z-index: 2;
}

.tag {
  position: static;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.72);
  font-size: 0.7rem;
  line-height: 1;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.tag.video {
  background: rgba(124, 156, 255, 0.16);
  color: #a9c0ff;
  border: 1px solid rgba(124, 156, 255, 0.25);
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

.download {
  flex: 1;
  background: linear-gradient(135deg, var(--accent), #5b85ff);
  color: white;
  font-weight: 700;
}

.view {
  flex: 1;
  background: rgba(255,255,255,0.06);
  color: white;
  border: 1px solid var(--line);
}

.download:hover,
.view:hover {
  border-color: rgba(124, 156, 255, 0.45);
}

/* Modal */
#modal {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background: rgba(0,0,0,0.74);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 9998;
}

.modal {
  width: min(920px, 100%);
  max-height: min(86vh, 920px);
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.08);
  background:
    linear-gradient(180deg, rgba(18, 22, 35, 0.98), rgba(12, 15, 23, 0.98));
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.6);
  padding: 18px;
  display: flex;
  flex-direction: column;
}

.modal-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  margin-bottom: 12px;
}

#modalVideo {
  grid-column: 1 / -1;
  margin-bottom: 6px;
}

.modal-top > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

#modalTitle {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
}

#modalSubtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  min-height: 18px;
}

#closeModal {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.06);
  color: white;
}

#jsonView {
  margin: 0;
  padding: 16px;
  border-radius: 18px;
  background: #090c13;
  border: 1px solid var(--line);
  color: #d8e8ff;
  overflow: auto;
  white-space: pre;
  line-height: 1.55;
  flex: 1;
  max-height: 420px;
  scroll-behavior: smooth;
}

#jsonView pre {
  margin: 0;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

#copyBtn {
  min-width: 120px;
  background: linear-gradient(135deg, #2dd4bf, #22c55e);
  color: white;
  font-weight: 800;
}

/* Video */
.modal-video {
  width: 100%;
  height: 300px;
  border: 0;
  border-radius: 18px;
  object-fit: cover;
}

#modalVideo:empty {
  display: none;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 34px 24px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed rgba(255,255,255,0.14);
  border-radius: 22px;
  background: rgba(255,255,255,0.03);
}

/* Popup */
.popup {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 78px;
  background: rgba(0,0,0,0);
  backdrop-filter: blur(0px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, backdrop-filter 0.25s ease, background 0.25s ease;
}

.popup.show {
  opacity: 1;
  pointer-events: auto;
  background: rgba(0,0,0,0.54);
  backdrop-filter: blur(8px);
}

.popup-box {
  width: min(430px, 92%);
  background: linear-gradient(180deg, rgba(20,24,37,0.98), rgba(14,17,27,0.98));
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 22px 65px rgba(0,0,0,0.5);
  position: relative;
  transform: translateY(-12px) scale(0.97);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.popup--large .popup-box {
  width: min(780px, 92%);
  max-height: 86vh;
  overflow: auto;
}

.popup.show .popup-box {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.06);
  color: white;
}

#popupTitle {
  margin: 0 0 6px;
  font-size: 1.02rem;
}

#popupText {
  margin: 0 0 14px;
  color: rgba(255,255,255,0.75);
  white-space: pre-line;
}

#popupText img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 14px;
  display: block;
  margin-top: 8px;
}

.popup-img {
  width: 100%;
  max-width: 650px;
  border-radius: 14px;
  display: block;
  margin: 10px auto;
}

#popupBtn {
  width: 100%;
  padding: 11px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  font-weight: 700;
}

.help-carousel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
}

.help-content {
  flex: 1;
  text-align: center;
}

.help-content img {
  display: block;
  margin: 10px auto;
  border-radius: 14px;
}

.nav-arrow {
  position: absolute;
  top: 50%;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
}

.nav-arrow.left {
  left: 8px;
}

.nav-arrow.right {
  right: 8px;
}

.nav-arrow img {
  width: 28px;
  height: 28px;
  opacity: 0.65;
}

/* Footer */
.footer {
  grid-column: 1 / -1;
  margin-top: 8px;
  padding: 22px 0 6px;
  border-top: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.62);
  font-size: 0.85rem;
}

.footer-inner {
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.footer-top {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: center;
  text-align: center;
}

.footer-bottom {
  display: flex;
  gap: 28px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-bottom a {
  color: rgba(255,255,255,0.72);
  text-decoration: none;
  transition: color 0.15s ease, opacity 0.15s ease;
}

.footer-bottom a:hover {
  color: var(--accent);
}

.credit {
  white-space: nowrap;
  color: white;
  text-shadow:
    0 0 6px rgba(255,255,255,0.28),
    0 0 14px rgba(255,255,255,0.12);
}

.seralyth {
  color: #8e63ff;
  font-weight: 700;
}

/* Changelog */
.changelog {
  grid-column: 2;
  max-width: 860px;
  margin: 10px 0 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0;
}

.change-block {
  padding: 18px 18px 18px 20px;
  border-left: 3px solid rgba(124, 156, 255, 0.65);
  background: rgba(255,255,255,0.03);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.change-block:hover {
  background: rgba(255,255,255,0.05);
  border-left-color: rgba(167, 139, 250, 0.95);
  transform: translateY(-2px);
}

.change-block h2,
.change-block h3 {
  margin: 0;
  font-size: 1.04rem;
}

.change-block .date {
  font-size: 0.78rem;
  color: var(--muted);
  opacity: 0.85;
}

.change-block p,
.change-block li {
  margin: 0;
  color: rgba(255,255,255,0.76);
  line-height: 1.55;
}

.change-block ul {
  margin: 0;
  padding-left: 18px;
}

/* FAQ */
.faq {
  grid-column: 2;
  max-width: 860px;
  margin-top: 10px;
}

.faq-block {
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding: 12px 0;
}

.faq-question {
  background: none;
  border: none;
  color: white;
  font-size: 1rem;
  text-align: left;
  width: 100%;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 0;
}

.faq-answer {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  padding-left: 10px;
  margin-top: 0;
  color: rgba(255,255,255,0.76);
  line-height: 1.55;
  transition: max-height 0.25s ease, opacity 0.2s ease, margin-top 0.25s ease;
}

.faq-block.open .faq-answer {
  opacity: 0.84;
  max-height: 260px;
  margin-top: 6px;
}

.faq-arrow {
  transition: transform 0.2s ease;
  opacity: 0.7;
}

.faq-block.open .faq-arrow {
  transform: rotate(180deg);
}

.credit-tag {
  font-size: 0.75rem;
  font-weight: 800;
  color: white;
  display: inline;
  text-shadow:
    0 0 6px rgba(255, 255, 255, 0.9),
    0 0 12px rgba(180, 140, 255, 0.6),
    0 0 18px rgba(120, 200, 255, 0.35);
  animation: glowPulse 2.8s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% {
    text-shadow:
      0 0 4px rgba(255, 255, 255, 0.8),
      0 0 10px rgba(180, 140, 255, 0.5),
      0 0 16px rgba(120, 200, 255, 0.25);
  }

  50% {
    text-shadow:
      0 0 8px rgba(255, 255, 255, 1),
      0 0 16px rgba(180, 140, 255, 0.7),
      0 0 24px rgba(120, 200, 255, 0.4);
  }
}

.credit-tag::before {
  content: "@";
  opacity: 0.55;
  margin-right: 1px;
}

#modalTitle {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Better scrollbars */
#jsonView,
.modal,
.popup-box,
.sort-dropdown {
  scrollbar-width: thin;
  scrollbar-color: rgba(124, 156, 255, 0.45) rgba(255,255,255,0.04);
}

#jsonView::-webkit-scrollbar,
.modal::-webkit-scrollbar,
.popup-box::-webkit-scrollbar,
.sort-dropdown::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

#jsonView::-webkit-scrollbar-thumb,
.modal::-webkit-scrollbar-thumb,
.popup-box::-webkit-scrollbar-thumb,
.sort-dropdown::-webkit-scrollbar-thumb {
  background: rgba(124, 156, 255, 0.42);
  border-radius: 999px;
}

#jsonView::-webkit-scrollbar-track,
.modal::-webkit-scrollbar-track,
.popup-box::-webkit-scrollbar-track,
.sort-dropdown::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.04);
}

/* Mobile */
@media (max-width: 1024px) {
  .page {
    grid-template-columns: 1fr;
  }

  .hero,
  main,
  .changelog,
  .faq {
    grid-column: 1;
    position: static;
  }

  .hero {
    top: auto;
  }
}

@media (max-width: 720px) {
  .page {
    width: min(100%, calc(100% - 20px));
    padding-top: 10px;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
    top: 8px;
    padding: 16px;
  }

  .search-wrap {
    flex-basis: auto;
  }

  .hero {
    padding: 18px;
  }

  #grid {
    grid-template-columns: 1fr;
  }

  .actions {
    flex-direction: column;
  }

  .modal {
    max-height: 90vh;
    padding: 14px;
  }

  .modal-video {
    height: 220px;
  }

  .footer-top,
  .footer-bottom {
    gap: 14px;
  }

  .popup {
    padding-top: 50px;
  }

  .popup-box {
    width: min(96%, 520px);
  }

  .popup--large .popup-box {
    width: min(96%, 780px);
  }
}