/* Memes site: base + editor. Mobile first, RTL, Cairo only. */
:root {
  --m-bg: #0f0f12;
  --m-surface: #1a1a20;
  --m-text: #f5f5f7;
  --m-muted: #a0a0ad;
  --m-accent: #ffe600;
  --m-accent-ink: #111;
  --m-radius: 14px;
  --m-gap: 12px;
}

html { font-family: 'Cairo', sans-serif; }
body { background: var(--m-bg); color: var(--m-text); font-family: 'Cairo', sans-serif; }
body, h1, h2, h3, h4, h5, h6, p, button, input, textarea { font-family: 'Cairo', sans-serif; }
a { color: var(--m-accent); }

.meme-section { font-size: 16px; }
.meme-page { width: 100%; max-width: 760px; margin-inline: auto; padding: 16px; box-sizing: border-box; } /* Bricks container = width:1100px; without width:100% it stayed 760px on phones */
.meme-title { font-size: clamp(1.5em, 5vw, 2.25em); font-weight: 900; line-height: 1.3; margin: 0 0 6px; }
.meme-source { color: var(--m-muted); font-size: 0.95em; margin: 0 0 10px; }
.meme-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.meme-chips a { background: var(--m-surface); color: var(--m-text); text-decoration: none; padding: 4px 12px; border-radius: 999px; font-size: 0.9em; border: 1px solid #2a2a33; }
.meme-chips a:hover { border-color: var(--m-accent); }
.meme-desc { font-size: 1.05em; line-height: 1.8; margin: 20px 0 8px; }
.meme-aliases { color: var(--m-muted); font-size: 0.9em; margin: 0 0 24px; }
.meme-related-title { font-size: 1.25em; font-weight: 700; margin: 24px 0 12px; }
.meme-cta { background: var(--m-surface); border-radius: var(--m-radius); padding: 14px 16px; margin-top: 32px; font-size: 0.95em; }

/* Editor */
.meme-editor { display: grid; gap: var(--m-gap); }
.meme-editor__stage { background: #000; border-radius: var(--m-radius); overflow: hidden; }
.meme-editor__canvas { display: block; width: 100%; height: auto; }
.meme-editor__fields { display: grid; gap: 8px; }
.meme-editor__field { display: grid; gap: 4px; }
.meme-editor__field span { font-size: 0.9em; color: var(--m-muted); }
.meme-editor__field textarea {
  width: 100%; resize: vertical; min-height: 2.6em; padding: 10px 12px;
  background: var(--m-surface); color: var(--m-text); border: 1px solid #2a2a33;
  border-radius: 10px; font-size: 1.05em; line-height: 1.5;
}
.meme-editor__field textarea:focus { outline: 2px solid var(--m-accent); border-color: transparent; }
.meme-editor__controls { display: flex; justify-content: space-between; align-items: center; gap: var(--m-gap); flex-wrap: wrap; }
.meme-editor__sizes { display: flex; gap: 6px; }
.meme-editor__sizes button {
  background: var(--m-surface); color: var(--m-text); border: 1px solid #2a2a33; border-radius: 10px;
  padding: 6px 14px; font-size: 0.95em; font-weight: 700; cursor: pointer;
}
.meme-editor__sizes button[aria-pressed="true"] { background: var(--m-accent); color: var(--m-accent-ink); border-color: var(--m-accent); }
.meme-editor__colors { display: flex; gap: 8px; flex-wrap: wrap; }
.meme-editor__colors button {
  width: 34px; height: 34px; border-radius: 50%; background: var(--swatch); border: 2px solid #3a3a44; cursor: pointer;
}
.meme-editor__colors button[aria-pressed="true"] { border-color: var(--m-accent); box-shadow: 0 0 0 3px rgba(255, 230, 0, 0.25); }
.meme-editor__actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 8px; }
.meme-editor__btn {
  padding: 14px 10px; border-radius: 12px; font-size: 1.1em; font-weight: 700; cursor: pointer;
  background: var(--m-surface); color: var(--m-text); border: 1px solid #2a2a33;
}
.meme-editor__btn--share { background: var(--m-accent); color: var(--m-accent-ink); border-color: var(--m-accent); }
.meme-editor__btn:active { transform: translateY(1px); }
.meme-editor__toast { background: #222; color: #fff; padding: 10px 14px; border-radius: 10px; margin: 0; text-align: center; }

@media (min-width: 640px) {
  .meme-editor__actions { grid-template-columns: repeat(3, 1fr); }
}
/* Home */
.meme-hero { padding-block: 28px 8px; }
.meme-hero__title { font-size: clamp(1.6em, 6vw, 2.6em); font-weight: 900; line-height: 1.25; margin: 0 0 6px; }
.meme-hero__sub { color: var(--m-muted); margin: 0 0 18px; font-size: 1.05em; }
.meme-search, .meme-search .jet-search-filter, .meme-search .jet-search-filter__input-wrapper { width: 100%; }
.meme-search .jet-search-filter__input,
.meme-search input[type="search"], .meme-search input[type="text"] {
  width: 100%; padding: 14px 16px; font-size: 1.1em; background: var(--m-surface); color: var(--m-text);
  border: 1px solid #2a2a33; border-radius: 12px; font-family: 'Cairo', sans-serif;
}
.meme-search .jet-search-filter__input:focus { outline: 2px solid var(--m-accent); border-color: transparent; }
.meme-search .jet-search-filter__submit { display: none; }
.meme-filter { margin-block: 12px; }
.meme-filter .jet-filter { width: 100%; }
.meme-filter .jet-radio-list, .meme-filter .jet-checkboxes-list { display: flex; flex-wrap: wrap; gap: 8px; }
.meme-filter .jet-radio-list__row, .meme-filter .jet-checkboxes-list__row { margin: 0; }
.meme-filter .jet-radio-list__item, .meme-filter .jet-checkboxes-list__item { margin: 0; }
.meme-filter .jet-radio-list__input, .meme-filter .jet-checkboxes-list__input { position: absolute; opacity: 0; pointer-events: none; }
.meme-filter .jet-radio-list__decorator, .meme-filter .jet-checkboxes-list__decorator { display: none; }
.meme-filter .jet-radio-list__label, .meme-filter .jet-checkboxes-list__label {
  display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--m-surface); color: var(--m-text);
  border: 1px solid #2a2a33; cursor: pointer; font-size: 0.95em; line-height: 1.5;
}
.meme-filter .jet-radio-list__input:checked ~ .jet-radio-list__label,
.meme-filter .jet-checkboxes-list__input:checked ~ .jet-checkboxes-list__label {
  background: var(--m-accent); color: var(--m-accent-ink); border-color: var(--m-accent);
}
.meme-filter__label { color: var(--m-muted); font-size: 0.85em; margin: 0 0 6px; }

/* Grid + card */
.meme-grid { margin-top: 20px; }
.meme-grid .jet-listing-grid__items { gap: 14px; }
.meme-card { display: grid; gap: 6px; }
.meme-card__link { text-decoration: none; color: inherit; display: grid; gap: 8px; }
.meme-card__media { display: block; background: #000; border-radius: 12px; overflow: hidden; aspect-ratio: 1 / 1; }
.meme-card__img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.meme-card__link:hover .meme-card__img { transform: scale(1.03); }
.meme-card__noimg { display: grid; place-items: center; height: 100%; color: var(--m-muted); }
.meme-card__quote { font-weight: 700; font-size: 1em; line-height: 1.5; }
.meme-card__mood { justify-self: start; font-size: 0.8em; color: var(--m-muted); text-decoration: none; }
.meme-card__mood:hover { color: var(--m-accent); }
.jet-listing-not-found { color: var(--m-muted); padding: 24px 0; }
/* Archive */
.meme-archive { padding-block: 28px 8px; }
.meme-archive__kicker { color: var(--m-accent); font-size: 0.9em; font-weight: 700; margin: 0 0 4px; }

/* Related */
.meme-related__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.meme-related .meme-card__quote { font-size: 0.9em; }
@media (max-width: 640px) { .meme-related__grid { grid-template-columns: repeat(2, 1fr); } }

/* Header / footer */
.meme-header { border-bottom: 1px solid #1f1f26; }
.meme-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 12px; }
.meme-header__logo { font-weight: 900; font-size: 1.5em; color: var(--m-accent); text-decoration: none; }
.meme-header__nav { display: flex; gap: 14px; }
.meme-header__nav a { color: var(--m-text); text-decoration: none; font-weight: 700; font-size: 0.95em; }
.meme-header__nav a:hover { color: var(--m-accent); }
.meme-footer { border-top: 1px solid #1f1f26; margin-top: 40px; }
.meme-footer__text { color: var(--m-muted); font-size: 0.9em; padding-block: 18px; margin: 0; }
.meme-footer__text a { color: var(--m-muted); text-decoration: underline; }
/* Suggest form */
/* honeypot: stays in place, invisible — left:-9999px widened the RTL page to 10k px on phones */
.meme-hp { position: absolute !important; inset-inline-start: 0 !important; width: 1px !important; height: 1px !important; padding: 0 !important; border: 0 !important; opacity: 0; overflow: hidden; clip-path: inset(50%); pointer-events: none; }
html, body { overflow-x: clip; }
.meme-form .jet-form-builder__field:not([type="file"]), .meme-form .jet-form-builder__field.textarea-field {
  width: 100%; padding: 12px 14px; background: var(--m-surface); color: var(--m-text); border: 1px solid #2a2a33; border-radius: 10px; font-family: 'Cairo', sans-serif; font-size: 1em;
}
.meme-form .jet-form-builder__label { color: var(--m-muted); font-size: 0.9em; margin-bottom: 4px; display: block; }
.meme-form .jet-form-builder__row { margin-bottom: 14px; }
.meme-form .jet-form-builder__submit { background: var(--m-accent); color: var(--m-accent-ink); border: 0; border-radius: 12px; padding: 14px 24px; font-weight: 700; font-size: 1.05em; font-family: 'Cairo', sans-serif; cursor: pointer; }
.meme-form .jet-form-builder-message { margin-top: 12px; padding: 12px; border-radius: 10px; background: var(--m-surface); }
.meme-form .jet-form-builder-file-upload__input { color: var(--m-text); }