/* ==========================================================================
   Egg Scripts - Custom Stylesheet
   Layout system: light-gray page + white content cards
   Tailwind CDN handles utilities; this file owns the component layer.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand */
  --egg: #F5B814;
  --egg-dark: #D4A012;
  --egg-deep: #92710C;
  --egg-soft: #FEF3CD;

  /* Neutrals */
  --charcoal: #1C1C1E;
  --charcoal-2: #2C2C2E;
  --ink: #23232A;
  --muted: #6B6B74;
  --muted-2: #93939C;

  /* Surfaces */
  --page: #F1F1EE;
  --surface: #FFFFFF;
  --surface-2: #F7F7F4;
  --line: #E6E6E0;
  --line-2: #EFEFEA;

  /* Semantic */
  --ok: #16A34A;
  --ok-soft: #E8F7EE;
  --warn: #B45309;
  --warn-soft: #FEF3C7;
  --danger: #DC2626;
  --danger-soft: #FEE9E9;
  --info: #2563EB;
  --info-soft: #E8F0FE;

  /* Type */
  --font-display: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;

  /* Shape */
  --r-card: 14px;
  --r-md: 10px;
  --r-sm: 7px;

  --sh-card: 0 1px 2px rgba(28, 28, 30, .05);
  --sh-hover: 0 6px 20px rgba(28, 28, 30, .09);
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
html { scroll-behavior: smooth; }

body {
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 { font-family: var(--font-display); color: var(--charcoal); }

a { text-decoration: none; }

/* Shell width */
.shell { max-width: 1180px; margin-inline: auto; padding-inline: 16px; }

/* --------------------------------------------------------------------------
   3. Card - the core surface primitive
   -------------------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--sh-card);
}

.card__pad   { padding: 20px; }
.card__pad-l { padding: 26px; }

.card__head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card__title {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 800;
  color: var(--charcoal);
  letter-spacing: -.01em;
}

.card__divider { height: 1px; background: var(--line-2); }

/* Section heading used above card groups */
.sec-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--charcoal);
}

.sec-sub { color: var(--muted); font-size: .9375rem; }

/* --------------------------------------------------------------------------
   4. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--r-md);
  font-size: .875rem;
  font-weight: 600;
  line-height: 1;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .12s ease;
  white-space: nowrap;
}

.btn:active { transform: translateY(1px); }

.btn--dark   { background: var(--charcoal); color: #fff; }
.btn--dark:hover { background: var(--charcoal-2); }

.btn--egg    { background: var(--egg); color: var(--charcoal); font-weight: 700; }
.btn--egg:hover { background: var(--egg-dark); }

.btn--ghost  { background: var(--surface-2); color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: #EFEFE9; }

.btn--outline { background: #fff; color: var(--ink); border-color: var(--line); }
.btn--outline:hover { background: var(--surface-2); }

.btn--block  { width: 100%; }
.btn--sm     { padding: 7px 12px; font-size: .8125rem; }

/* Icon-only round button */
.icon-btn {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.icon-btn:hover { background: #EDEDE7; color: var(--charcoal); }

/* --------------------------------------------------------------------------
   5. Badges / Pills
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: .6875rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  letter-spacing: .01em;
}

.badge--keyless { background: var(--egg); color: var(--charcoal); }
.badge--has-key { background: #E4E4DE; color: #55554E; }
.badge--game    { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.badge--verified{ background: var(--ok-soft); color: #14713C; }
.badge--new     { background: var(--egg-soft); color: var(--egg-deep); }

/* Views / time overlay pills on thumbnails */
.pill-glass {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: .6875rem;
  font-weight: 600;
  background: rgba(20, 20, 22, .68);
  color: #fff;
  backdrop-filter: blur(4px);
}

.pill-count {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: .75rem;
  font-weight: 600;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   6. Script Card (grid item)
   -------------------------------------------------------------------------- */
.script-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--sh-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.script-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-hover);
  border-color: #DBDBD3;
}

.script-card__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.script-card__media img { width: 100%; height: 100%; object-fit: cover; }

.script-card__body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.script-card__title {
  font-family: var(--font-display);
  font-size: .9375rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--charcoal);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}

.script-card__title a:hover { color: var(--egg-deep); }

.script-card__meta {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .75rem;
  color: var(--muted-2);
}

/* Author chip */
.author-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .75rem;
  color: var(--muted);
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--charcoal);
  color: #fff;
  font-weight: 800;
  letter-spacing: .02em;
  flex-shrink: 0;
}

.avatar--xs { width: 20px; height: 20px; font-size: .5625rem; }
.avatar--sm { width: 28px; height: 28px; font-size: .6875rem; }
.avatar--md { width: 40px; height: 40px; font-size: .8125rem; }

/* --------------------------------------------------------------------------
   7. Placeholder Thumbnails (gradient boxes - no scraped images)
   -------------------------------------------------------------------------- */
.thumb {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumb__label {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: rgba(255, 255, 255, .92);
  text-shadow: 0 1px 8px rgba(0, 0, 0, .25);
  padding: 0 10px;
  text-align: center;
  pointer-events: none;
}

.thumb--blox-fruits { background: linear-gradient(135deg, #5B6BE1 0%, #7B4BC4 100%); }
.thumb--fisch       { background: linear-gradient(135deg, #0C93D6 0%, #2BC6B4 100%); }
.thumb--garden      { background: linear-gradient(135deg, #23A757 0%, #8FCB2F 100%); }
.thumb--rivals      { background: linear-gradient(135deg, #E03E3E 0%, #F27127 100%); }
.thumb--brainrot    { background: linear-gradient(135deg, #8B48DE 0%, #DE4694 100%); }
.thumb--blade-ball  { background: linear-gradient(135deg, #EFA00B 0%, #E0552F 100%); }
.thumb--pet-sim     { background: linear-gradient(135deg, #E76BA8 0%, #9E5BD6 100%); }
.thumb--doors       { background: linear-gradient(135deg, #3B4453 0%, #6C7789 100%); }
.thumb--jailbreak   { background: linear-gradient(135deg, #1F7BC4 0%, #16B0AE 100%); }
.thumb--mm2         { background: linear-gradient(135deg, #C0392B 0%, #7A2233 100%); }
.thumb--arsenal     { background: linear-gradient(135deg, #E48B15 0%, #C1451F 100%); }
.thumb--universal   { background: linear-gradient(135deg, #4B5563 0%, #1F2937 100%); }

/* --------------------------------------------------------------------------
   8. Code Card (script block)
   -------------------------------------------------------------------------- */
.code-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--sh-card);
  overflow: hidden;
}

.code-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-2);
  flex-wrap: wrap;
}

.code-card__icon {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--charcoal);
  color: var(--egg);
  flex-shrink: 0;
}

.code-card__meta { font-size: .75rem; color: var(--muted-2); margin-top: 2px; }

.code-card__body {
  background: #FBFBF9;
  padding: 18px;
  overflow-x: auto;
  max-height: 340px;
  overflow-y: auto;
}

.code-card__body pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: .8125rem;
  line-height: 1.75;
  color: #33333B;
  white-space: pre;
  tab-size: 2;
}

/* Lua token colors - readable on light surface */
.tok-fn   { color: #C2410C; }
.tok-str  { color: #15803D; }
.tok-kw   { color: #7C3AED; }
.tok-com  { color: #94949C; font-style: italic; }
.tok-num  { color: #B45309; }

.code-card__body::-webkit-scrollbar { width: 8px; height: 8px; }
.code-card__body::-webkit-scrollbar-track { background: transparent; }
.code-card__body::-webkit-scrollbar-thumb { background: #D6D6CE; border-radius: 4px; }
.code-card__body::-webkit-scrollbar-thumb:hover { background: #C2C2B8; }

/* Copied state */
.is-copied { background: var(--ok) !important; color: #fff !important; border-color: var(--ok) !important; }

/* --------------------------------------------------------------------------
   9. Feature list ( + bullets, like reference )
   -------------------------------------------------------------------------- */
.feat-list { display: grid; gap: 9px; }

.feat-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: .9375rem;
  color: #3F3F46;
  line-height: 1.5;
}

.feat-list li::before {
  content: "+";
  color: var(--egg-dark);
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.35;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .feat-list--2col { grid-template-columns: 1fr 1fr; column-gap: 24px; }
}

/* --------------------------------------------------------------------------
   10. Similar / Related list (sidebar)
   -------------------------------------------------------------------------- */
.sim-list { display: flex; flex-direction: column; }

.sim-item {
  display: flex;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line-2);
  transition: background .15s ease;
}

.sim-item:last-child { border-bottom: 0; }
.sim-item:hover { background: var(--surface-2); }

.sim-item__thumb {
  position: relative;
  width: 84px;
  height: 50px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.sim-item__title {
  font-size: .8125rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--charcoal);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sim-item:hover .sim-item__title { color: var(--egg-deep); }
.sim-item__time { font-size: .6875rem; color: var(--muted-2); margin-top: 4px; }

/* --------------------------------------------------------------------------
   11. Info rows (Script Info table)
   -------------------------------------------------------------------------- */
.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line-2);
  font-size: .8125rem;
}

.info-row:last-child { border-bottom: 0; }
.info-row__k { color: var(--muted); }
.info-row__v { font-weight: 600; color: var(--charcoal); text-align: right; }

/* --------------------------------------------------------------------------
   12. Accordion (filters + FAQ)
   -------------------------------------------------------------------------- */
.acc { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.acc + .acc { margin-top: 10px; }

.acc__btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: transparent;
  border: 0;
  text-align: left;
  font-family: var(--font-display);
  font-size: .9375rem;
  font-weight: 700;
  color: var(--charcoal);
  cursor: pointer;
}

.acc__btn:hover { background: var(--surface-2); }

.acc__chev { transition: transform .2s ease; color: var(--muted); flex-shrink: 0; }
.acc.is-open .acc__chev { transform: rotate(180deg); }

.acc__panel {
  display: none;
  padding: 0 18px 18px;
  font-size: .9375rem;
  color: #4A4A52;
  line-height: 1.65;
}

.acc.is-open .acc__panel { display: block; }

/* --------------------------------------------------------------------------
   13. Game tiles (Browse by Game)
   -------------------------------------------------------------------------- */
.game-tile {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line);
  transition: transform .18s ease, box-shadow .18s ease;
}

.game-tile:hover { transform: translateY(-2px); box-shadow: var(--sh-hover); }

.game-tile__cap {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 18px 10px 8px;
  background: linear-gradient(to top, rgba(0, 0, 0, .78), transparent);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.25;
}

.game-tile__count { display: block; font-size: .625rem; font-weight: 500; opacity: .8; margin-top: 2px; }

/* --------------------------------------------------------------------------
   14. Pros / Cons panels
   -------------------------------------------------------------------------- */
.panel-pro, .panel-con {
  border-radius: var(--r-md);
  padding: 18px;
  border: 1px solid;
}

.panel-pro { background: #F1FAF4; border-color: #C8EBD6; }
.panel-con { background: #FEF5F5; border-color: #F5D2D2; }

.panel-pro h3 { color: #146C3A; }
.panel-con h3 { color: #A32222; }

.panel-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: .875rem;
  line-height: 1.6;
  padding: 6px 0;
  color: #3F3F46;
}

.panel-list li::before {
  font-weight: 800;
  flex-shrink: 0;
  line-height: 1.6;
}
.panel-pro .panel-list li::before { content: "✓"; color: var(--ok); }
.panel-con .panel-list li::before { content: "✕"; color: var(--danger); }

/* Text wrapper keeps the bullet icon and the copy as the only two flex children,
   so an inline <strong> label stays inside the sentence instead of becoming
   its own column. */
.panel-list li > span {
  flex: 1 1 auto;
  min-width: 0;
}

.panel-list li strong,
.panel-list li b {
  font-weight: 700;
  color: var(--charcoal);
}

.panel-pro .panel-list li strong,
.panel-pro .panel-list li b { color: #135E33; }

.panel-con .panel-list li strong,
.panel-con .panel-list li b { color: #8F1D1D; }

/* --------------------------------------------------------------------------
   15. Step blocks (How to Use)
   -------------------------------------------------------------------------- */
.step {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 20px 18px;
  text-align: center;
}

.step__num {
  width: 40px; height: 40px;
  margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--egg);
  color: var(--charcoal);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
}

.step__title { font-size: .9375rem; font-weight: 700; margin-bottom: 6px; }
.step__text  { font-size: .8125rem; color: var(--muted); line-height: 1.6; }

/* --------------------------------------------------------------------------
   16. Ad slots
   -------------------------------------------------------------------------- */
.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(45deg, #EDEDE7, #EDEDE7 10px, #F5F5F0 10px, #F5F5F0 20px);
  border: 1px dashed #D2D2C8;
  border-radius: var(--r-md);
  color: var(--muted-2);
  font-size: .6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.ad-slot--leaderboard { min-height: 90px; }
.ad-slot--sidebar     { min-height: 250px; }

/* --------------------------------------------------------------------------
   17. Breadcrumb
   -------------------------------------------------------------------------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: .8125rem;
  color: var(--muted);
}

.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--charcoal); }
.breadcrumb__sep { color: #C4C4BC; }
.breadcrumb__current { color: var(--charcoal); font-weight: 600; }

/* --------------------------------------------------------------------------
   18. Pagination
   -------------------------------------------------------------------------- */
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; }

.pagination__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  font-size: .875rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all .15s ease;
}

.pagination__btn:hover:not(:disabled) { background: var(--surface-2); color: var(--charcoal); }
.pagination__btn:disabled { opacity: .45; cursor: not-allowed; }
.pagination__btn--active { background: var(--charcoal); color: #fff; border-color: var(--charcoal); }

/* --------------------------------------------------------------------------
   19. Modal + Mobile menu
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(28, 28, 30, .48);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}

.modal-overlay.is-open { opacity: 1; visibility: visible; }

.modal-panel {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .22);
  width: 100%;
  max-width: 44rem;
  max-height: calc(100vh - 5rem);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(.96);
  transition: transform .2s ease;
}

.modal-overlay.is-open .modal-panel { transform: scale(1); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(28, 28, 30, .48);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}

.mobile-menu.is-open { opacity: 1; visibility: visible; }

.mobile-menu__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(20rem, 86vw);
  height: 100%;
  background: #fff;
  box-shadow: -6px 0 28px rgba(0, 0, 0, .14);
  transform: translateX(100%);
  transition: transform .25s ease;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.mobile-menu.is-open .mobile-menu__panel { transform: translateX(0); }

/* --------------------------------------------------------------------------
   20. Prose (SEO content blocks)
   -------------------------------------------------------------------------- */
.prose-block { font-size: .9375rem; line-height: 1.75; color: #45454E; }
.prose-block p { margin-bottom: 14px; }
.prose-block p:last-child { margin-bottom: 0; }
.prose-block strong { color: var(--charcoal); font-weight: 600; }
.prose-block h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin: 22px 0 10px;
  color: var(--charcoal);
}

/* Comparison table */
.cmp-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.cmp-table th, .cmp-table td { padding: 11px 14px; border: 1px solid var(--line); text-align: left; }
.cmp-table thead th { background: var(--surface-2); font-weight: 700; color: var(--charcoal); }
.cmp-table tbody tr:nth-child(even) { background: #FCFCFA; }

/* --------------------------------------------------------------------------
   21. Accessibility
   -------------------------------------------------------------------------- */
:focus-visible { outline: 2px solid var(--egg); outline-offset: 2px; }

.skip-link {
  position: absolute;
  top: -120%;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--charcoal);
  color: #fff;
  border-radius: 0 0 8px 8px;
  font-size: .875rem;
  font-weight: 600;
  transition: top .2s ease;
}

.skip-link:focus { top: 0; }

/* --------------------------------------------------------------------------
   22. Forms (contact, search, legal pages)
   -------------------------------------------------------------------------- */
.form-label {
  display: block;
  margin-bottom: 6px;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--charcoal);
}

.form-input {
  width: 100%;
  padding: 11px 14px;
  font: inherit;
  font-size: .9375rem;
  color: var(--charcoal);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
}

.form-input::placeholder { color: #A0A098; }

.form-input:focus {
  outline: none;
  border-color: var(--egg);
  box-shadow: 0 0 0 3px rgba(245, 184, 20, .18);
}

textarea.form-input { resize: vertical; min-height: 120px; }
select.form-input { cursor: pointer; }

/* Legal / prose page lists inherit .feat-list but need looser rhythm */
.prose-block .feat-list { margin: 4px 0 2px; }
.prose-block .feat-list + p { margin-top: 14px; }
.prose-block a { color: var(--egg-deep); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.prose-block a:hover { color: var(--charcoal); }

/* Inline links inside Customizer-managed copy (steps, FAQ answers, pros/cons,
   the note box). These fields accept <a> and <strong> via eggscripts_inline(). */
.panel-list a,
.step__text a,
.step__title a,
.acc__panel a,
.note-box a {
  color: var(--egg-deep);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-word;
}

.panel-list a:hover,
.step__text a:hover,
.step__title a:hover,
.acc__panel a:hover,
.note-box a:hover { color: var(--charcoal); }

.step__text strong,
.acc__panel strong { color: var(--charcoal); font-weight: 600; }

/* --------------------------------------------------------------------------
   23. Animations
   -------------------------------------------------------------------------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-in { animation: fadeInUp .35s ease both; }

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

/* =========================================================================
   24. WordPress core output - comments, search form, accessibility
   Added during theme conversion. Uses the same tokens as the rest of the
   design system so core markup does not look foreign.
   ========================================================================= */

.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;
}

.egg-searchform {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.egg-searchform .form-input { flex: 1 1 auto; }

.egg-comments { margin-top: 4px; }

.comment-list,
.comment-list .children {
  list-style: none;
  margin: 0;
  padding: 0;
}
.comment-list .children { margin-left: 20px; padding-left: 16px; border-left: 1px solid var(--line); }

.comment-list li.comment,
.comment-list li.pingback {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.comment-list li.comment:last-child { border-bottom: 0; }

.comment-list .comment-author img.avatar {
  border-radius: 999px;
  vertical-align: middle;
  margin-right: 10px;
}
.comment-list .comment-author .fn {
  font-weight: 600;
  color: var(--ink);
  font-style: normal;
}
.comment-list .comment-metadata {
  font-size: .8125rem;
  color: var(--muted);
  margin-top: 2px;
}
.comment-list .comment-metadata a { color: var(--muted); text-decoration: none; }
.comment-list .comment-metadata a:hover { color: var(--ink); }
.comment-list .comment-content {
  margin-top: 10px;
  font-size: .9375rem;
  line-height: 1.65;
  color: var(--ink);
}
.comment-list .reply { margin-top: 8px; }
.comment-list .reply a {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--egg-deep);
  text-decoration: none;
}
.comment-list .reply a:hover { text-decoration: underline; }

.comment-respond { margin-top: 24px; }
.comment-reply-title {
  font-family: var(--font-display, inherit);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
}
.comment-form p { margin-bottom: 12px; }
.comment-form label {
  display: block;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: .9375rem;
  color: var(--ink);
}
.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus {
  outline: none;
  border-color: var(--egg);
  box-shadow: 0 0 0 3px var(--egg-soft);
}
.comment-form .comment-form-cookies-consent label {
  display: inline;
  font-weight: 400;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   25. Status strip (Working / updated / tested on)
   -------------------------------------------------------------------------- */
.stat-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  margin-top: 14px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}

@media (min-width: 480px) {
  /* auto-fit so 2, 3 or 4 cells all fill the row with no empty gap */
  .stat-strip { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
}

.stat-strip__cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 11px 13px;
  background: var(--surface);
}

.stat-strip__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex-shrink: 0;
}

.stat-strip__icon.is-ok   { background: var(--ok-soft); color: #14713C; }
.stat-strip__icon.is-idle { background: var(--surface-2); color: var(--muted-2); }
.stat-strip__icon.is-egg  { background: var(--egg-soft); color: var(--egg-deep); }

.stat-strip__v {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .8125rem;
  line-height: 1.25;
  color: var(--charcoal);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-strip__v--link { color: var(--egg-deep); }

.stat-strip__k {
  display: block;
  font-size: .6875rem;
  color: var(--muted-2);
  margin-top: 1px;
}

/* --------------------------------------------------------------------------
   26. Author card + Follow
   -------------------------------------------------------------------------- */
.author-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

/* Below ~420px the Follow button steals too much room and clips the name,
   so stack the button under the identity block instead of truncating. */
@media (max-width: 419px) {
  .author-card { flex-wrap: wrap; }
  .author-card > [data-follow], .author-card .btn--ghost { width: 100%; }
}

.author-card__name {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .8125rem;
  color: var(--charcoal);
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.author-card__name:hover { color: var(--egg-deep); }

.author-card__meta {
  font-size: .6875rem;
  color: var(--muted-2);
  margin-top: 2px;
  line-height: 1.35;
}

/* --------------------------------------------------------------------------
   27. Vote buttons (like / dislike)
   -------------------------------------------------------------------------- */
.vote-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 9px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .8125rem;
  color: var(--muted);
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.vote-btn:hover { background: #EFEFE9; color: var(--charcoal); }

.vote-btn:focus-visible {
  outline: none;
  border-color: var(--egg);
  box-shadow: 0 0 0 3px var(--egg-soft);
}

.vote-btn[aria-pressed="true"] {
  background: var(--egg-soft);
  border-color: var(--egg);
  color: var(--egg-deep);
}

.vote-btn[data-vote="dislike"][aria-pressed="true"] {
  background: var(--danger-soft);
  border-color: #F3B4B4;
  color: #A81E1E;
}

.vote-btn.is-busy { opacity: .55; pointer-events: none; }

/* --------------------------------------------------------------------------
   28. Green action button (Game Link)
   -------------------------------------------------------------------------- */
.btn--green {
  background: var(--ok);
  color: #fff;
  border-color: var(--ok);
  font-weight: 700;
}

.btn--green:hover { background: #128A3E; border-color: #128A3E; }

/* --------------------------------------------------------------------------
   29. Live ad unit (real network code)
   -------------------------------------------------------------------------- */
.ad-unit {
  display: block;
  margin: 18px 0;
  text-align: center;
  overflow: hidden;
}

.ad-unit--sidebar { margin: 0 0 18px; }
.ad-unit ins, .ad-unit iframe, .ad-unit img { max-width: 100%; }

/* --------------------------------------------------------------------------
   30. Lua syntax highlighting
   -------------------------------------------------------------------------- */
.code-card__body .tok-kw  { color: #8B5CF6; font-weight: 600; }
.code-card__body .tok-str { color: #16A34A; }
.code-card__body .tok-fn  { color: #D97706; }
.code-card__body .tok-com { color: var(--muted-2); font-style: italic; }

/* --------------------------------------------------------------------------
   31. Footer community stats
   -------------------------------------------------------------------------- */
.community-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 14px;
}

.community-stats__item { min-width: 0; }

.community-stats__n {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.2;
  color: var(--egg);
}

.community-stats__k {
  display: block;
  font-size: .75rem;
  color: #9A9A93;
  margin-top: 2px;
}

/* --------------------------------------------------------------------------
   32. Title row (script detail header)
   The title gets the full row width; game / date / views sit on a separate
   meta line so long titles never squeeze into a narrow column on phones.
   -------------------------------------------------------------------------- */
.title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.title-row__thumb {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}

.title-row__h1 {
  flex: 1;
  min-width: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.125rem;
  line-height: 1.3;
  letter-spacing: -.01em;
  color: var(--charcoal);
  overflow-wrap: anywhere;
}

@media (min-width: 640px) {
  .title-row__thumb { width: 48px; height: 48px; }
  .title-row__h1    { font-size: 1.375rem; }
}

@media (min-width: 1024px) {
  .title-row__h1 { font-size: 1.5rem; }
}

.title-row__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  font-size: .8125rem;
  color: #8A8A92;
  line-height: 1.4;
}

.title-row__sep { color: #C9C9C2; }

/* --------------------------------------------------------------------------
   33. Action row (verified / author / favourite - share - report)
   -------------------------------------------------------------------------- */
.action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 20px;
}

.action-row__id {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  min-width: 0;
}

.action-row__btns {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Favourite (heart) active state */
.icon-btn.is-fav {
  background: var(--danger-soft);
  border-color: #F3B4B4;
  color: #C4302B;
}

.icon-btn.is-fav svg { fill: currentColor; }

/* --------------------------------------------------------------------------
   34. Mobile layer
   Everything above is authored desktop-first. This block tightens spacing,
   raises tap targets to the 44px accessibility minimum, and prevents any
   horizontal overflow on small screens.
   -------------------------------------------------------------------------- */

/* Never allow sideways scrolling, whatever a long word or code block does. */
html, body { overflow-x: hidden; }
img, video, iframe, table, pre { max-width: 100%; }

@media (max-width: 767px) {
  /* Tighter gutters so content is not squeezed on a 360-375px screen */
  .shell        { padding-inline: 14px; }
  .card__pad    { padding: 16px; }
  .card__pad-l  { padding: 18px; }
  .card__head   { padding: 14px 16px; }
  .action-row   { padding: 12px 16px; }
  .code-card__head { padding: 12px 16px; }
  .code-card__body { padding: 14px; max-height: 260px; }
  .sim-item     { padding: 12px 16px; }

  /* 44px is the minimum comfortable tap target (WCAG 2.5.5 / mobile UX) */
  .icon-btn { width: 44px; height: 44px; }
  .vote-btn { min-height: 44px; }
  .btn      { min-height: 42px; }
  .btn--sm  { min-height: 38px; }

  /* Two-up status strip reads better than one tall column */
  .stat-strip { grid-template-columns: 1fr 1fr; }

  /* Section headings scale down so they do not wrap into four lines */
  .sec-title  { font-size: 1.25rem; }
  .sec-sub    { font-size: .875rem; }
  .card__title{ font-size: 1rem; }

  /* Footer stats: even columns instead of a ragged wrap */
  .community-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
}

@media (max-width: 380px) {
  .shell        { padding-inline: 12px; }
  .card__pad    { padding: 14px; }
  .action-row   { padding: 10px 14px; }
  .stat-strip__cell { padding: 10px; gap: 8px; }
  .stat-strip__icon { width: 24px; height: 24px; }
  .sim-item__thumb  { width: 72px; height: 44px; }

  /* Full-width action buttons stack cleanly at this size */
  .action-row__btns { width: 100%; justify-content: flex-start; }
}

/* --------------------------------------------------------------------------
   25. Discovery bar, toolbar and filters modal
   Hero stats bar, hero search field, grid toolbar and the filters dialog.
   -------------------------------------------------------------------------- */

/* --- Hero search -------------------------------------------------------- */
.hero-search {
  display: flex;
  gap: 10px;
  align-items: stretch;
  max-width: 720px;
  margin: 22px auto 0;
}

.hero-search__field {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-card);
  transition: border-color .15s ease, box-shadow .15s ease;
}

.hero-search__field:focus-within {
  border-color: var(--egg);
  box-shadow: 0 0 0 3px var(--egg-soft);
}

.hero-search__icon {
  width: 18px;
  height: 18px;
  flex: none;
  margin-left: 12px;
  color: var(--muted-2);
}

.hero-search__input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 12px 10px;
  border: 0;
  background: transparent;
  font-size: .9375rem;
  color: var(--ink);
  outline: none;
}

.hero-search__input::placeholder { color: var(--muted-2); }

.hero-search__filters {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  margin: 5px;
  padding: 7px 12px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--ink);
  font-size: .8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}

.hero-search__filters:hover {
  background: var(--egg-soft);
  border-color: var(--egg);
}

.hero-search__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--egg);
  color: var(--charcoal);
  font-size: .6875rem;
  font-weight: 800;
  line-height: 1;
}

/* --- Hero stats bar ----------------------------------------------------- */
.stat-bar {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 22px;
  margin-top: 20px;
  padding: 11px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(28, 28, 30, .04);
}

.stat-bar__item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .8125rem;
  color: var(--muted);
  white-space: nowrap;
}

.stat-bar__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: var(--muted-2);
}

.stat-bar__icon svg { width: 15px; height: 15px; }

.stat-bar__num {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--charcoal);
}

.stat-bar__label {
  color: var(--muted);
}

/* The "scripts" counter uses a plain dot instead of an icon, so it needs
   its own box - it is not an <svg>. */
.stat-bar__dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, .14);
}

.stat-bar__item--scripts .stat-bar__icon { color: var(--ok); }
.stat-bar__item--today   .stat-bar__icon { color: var(--egg-dark); }
.stat-bar__item--members .stat-bar__icon { color: var(--info); }
.stat-bar__item--ratings .stat-bar__icon { color: var(--egg-dark); }

/* --- Grid head + toolbar ------------------------------------------------ */
.grid-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.grid-head__count {
  margin-top: 4px;
  font-size: .8125rem;
  color: var(--muted);
}

.grid-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.grid-tools__form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* --- Select ------------------------------------------------------------- */
.select {
  -webkit-appearance: none;
  appearance: none;
  padding: 8px 32px 8px 12px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B6B74' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px 14px;
  font-family: inherit;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

.select:focus-visible {
  outline: none;
  border-color: var(--egg);
  box-shadow: 0 0 0 3px var(--egg-soft);
}

.select--block { width: 100%; }

/* --- Filters modal ------------------------------------------------------ */
.filter-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px;
}

.filter-modal.is-open { display: flex; }

.filter-modal__overlay {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  width: 100%;
  background: rgba(28, 28, 30, .5);
  cursor: pointer;
}

.filter-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 620px;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: 0 18px 48px rgba(28, 28, 30, .22);
  overflow: hidden;
}

.filter-modal__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line-2);
}

.filter-modal__title {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 800;
  color: var(--charcoal);
  margin: 0;
}

.filter-modal__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--egg);
  color: var(--charcoal);
  font-size: .6875rem;
  font-weight: 800;
}

.filter-modal__x {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

.filter-modal__x:hover { background: #EFEFE9; color: var(--ink); }
.filter-modal__x svg { width: 16px; height: 16px; }

.filter-modal__form {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.filter-modal__body {
  padding: 16px 18px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.filter-modal__hint {
  margin-top: 14px;
  font-size: .75rem;
  color: var(--muted-2);
}

.filter-modal__foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--line-2);
  background: var(--surface-2);
}

.filter-modal__foot .btn--egg { margin-left: auto; }

/* --- Filter groups + chips ---------------------------------------------- */
.filter-group + .filter-group { margin-top: 18px; }

.filter-group__title {
  margin: 0 0 9px;
  font-family: var(--font-display);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: .8125rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.chip:hover { background: var(--surface-2); border-color: var(--muted-2); }

.chip input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.chip:has(input:checked) {
  background: var(--egg-soft);
  border-color: var(--egg);
  color: var(--egg-deep);
}

.chip:has(input:focus-visible) {
  outline: 2px solid var(--egg);
  outline-offset: 2px;
}

/* Fallback for browsers without :has() support */
.chip.is-active {
  background: var(--egg-soft);
  border-color: var(--egg);
  color: var(--egg-deep);
}

.chip__count {
  font-size: .6875rem;
  font-weight: 700;
  color: var(--muted-2);
}

.chip:has(input:checked) .chip__count,
.chip.is-active .chip__count { color: var(--egg-deep); }

/* --- Card meta row ------------------------------------------------------ */
.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--line-2);
  font-size: .75rem;
  color: var(--muted);
}

.card-meta__left,
.card-meta__likes,
.card-meta__item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.card-meta__left { min-width: 0; }

.card-meta__likes {
  margin-left: auto;
  font-weight: 600;
  color: var(--muted-2);
}

.card-meta__dot { color: var(--line); }

.card-meta svg { width: 13px; height: 13px; flex: none; }
.card-meta__likes svg { color: var(--egg-dark); }
.card-meta__item--likes svg { color: var(--egg-dark); }
.card-meta__date { margin-left: auto; }

/* --- Body lock while a modal is open ------------------------------------ */
.is-modal-open { overflow: hidden; }

/* --- Responsive --------------------------------------------------------- */
@media (max-width: 640px) {
  .hero-search { flex-wrap: wrap; }
  .hero-search__field { flex: 1 1 100%; }
  .hero-search > .btn { flex: 1 1 100%; }

  .stat-bar { gap: 8px 16px; }
  .stat-bar__item { font-size: .75rem; }

  .grid-head { align-items: flex-start; }
  .grid-tools,
  .grid-tools__form { width: 100%; }
  .grid-tools__form .select { flex: 1 1 140px; }
  .grid-tools > .btn { width: 100%; justify-content: center; }

  .filter-modal { padding: 0; align-items: stretch; }
  .filter-modal__panel {
    max-width: none;
    max-height: 100vh;
    border-radius: 0;
    border: 0;
  }
  .filter-modal__foot .btn { flex: 1 1 auto; justify-content: center; }
  .filter-modal__foot .btn--egg { margin-left: 0; }
}

@media (max-width: 380px) {
  .hero-search__filters span:not(.hero-search__count) { display: none; }
  .chip { padding: 8px 11px; font-size: .75rem; }
}
