/* Meme King · tokens */
:root {
  --dur-instant: 90ms; --dur-fast: 160ms; --dur-base: 240ms; --dur-medium: 360ms; --dur-slow: 560ms;
  --ease-out: cubic-bezier(.16, 1, .3, 1); --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --ease-in: cubic-bezier(.55, 0, 1, .45); --ease-pop: cubic-bezier(.34, 1.36, .64, 1);
  --rise-sm: 8px; --rise: 14px; --scale-in: .97; --press: .96; --dir: -1;

  --violet: #381883;      /* page */
  --violet-2: #2c1268;    /* sidebar */
  --violet-3: #4a23a8;    /* raised */
  --navy: #022775;
  --purple: #8c30fe;
  --blue: #2a66e0;
  --gold: #ffde59;
  --gold-ink: #2b1a00;
  --ink: #fff;
  --ink-2: #d9cdfa;
  --ink-3: #a99ad8;
  --paper: #fffaf0;
  --line: #000;
  --shadow: 3px 3px 0 #000;
  --shadow-lg: 6px 6px 0 #000;
  --radius: 6px;
  --side: 264px;
  --focus-ring: 0 0 0 2px var(--violet), 0 0 0 4px var(--gold);
}
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; background: var(--violet); color: var(--ink);
  font: 16px/1.5 Heebo, system-ui, sans-serif; overflow-x: hidden;
}
/* Daniel's swirl texture (his brand, from danielyosef.com) under everything, see-through so the violet stays the
   colour and the page stops feeling flat. A fixed layer: painted once, no scrolling cost, no layout effect. */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: url('ui/bg-swirl.webp') center / 760px repeat; opacity: var(--texture-alpha, .13);
}
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:where(a, button, input, select, textarea, summary, label, [tabindex]):focus-visible {
  outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius);
}
.skip { position: absolute; inset-inline-start: 8px; top: -60px; z-index: 99; background: var(--gold); color: var(--gold-ink); padding: 8px 12px; }
.skip:focus { top: 8px; }


/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 8px 16px; border: 2px solid var(--line); border-radius: var(--radius);
  background: var(--purple); color: #fff; font-weight: 700; box-shadow: var(--shadow);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), background var(--dur-fast);
  user-select: none; white-space: nowrap; text-decoration: none;
}
.btn img { width: 26px; height: 26px; object-fit: contain; }
@media (hover: hover) { .btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 #000; } }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #000; transition-duration: var(--dur-instant); }
.btn--gold { background: var(--gold); color: var(--gold-ink); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink-3); box-shadow: none; }
@media (hover: hover) { .btn--ghost:hover { box-shadow: none; border-color: var(--ink); } }
.btn--ghost:active { box-shadow: none; }
.btn--sm { min-height: 36px; padding: 4px 12px; font-size: 14px; }
.btn--big { min-height: 52px; font-size: 18px; }
.btn[aria-pressed="true"] { background: #ff6b1a; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.iconbtn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border: 2px solid #000;
  border-radius: var(--radius); background: var(--violet-3); box-shadow: var(--shadow); padding: 0;
}
.iconbtn img { width: 26px; height: 26px; }
.iconbtn--plain { background: transparent; border-color: transparent; box-shadow: none; font-size: 20px; }
@media (hover: hover) { .iconbtn--plain:hover { background: rgba(255,255,255,.08); } }
.iconbtn:disabled { opacity: .35; cursor: not-allowed; }
.flip img { transform: scaleX(-1); }

/* ---------- layout ---------- */
.topbar { display: none; }
.sidebar {
  position: fixed; inset-block: 0; inset-inline-start: 0; width: var(--side); z-index: 20;
  background: var(--violet-2); border-inline-end: 2px solid #000; overflow-y: auto; overscroll-behavior: contain;
  padding: 16px 12px 32px; scrollbar-width: thin; scrollbar-color: var(--violet-3) transparent;
}
.sidebar__brand { display: flex; align-items: center; gap: 10px; color: var(--gold); text-decoration: none; padding: 4px 8px 16px; }
.sidebar__brand span { font: 900 26px/1 Heebo, sans-serif; text-shadow: 2px 2px 0 #000; }
.nav { display: grid; gap: 2px; }
.nav__sep { height: 2px; background: rgba(0,0,0,.35); margin: 10px 8px; }
.nav__label { font-size: 12px; color: var(--ink-3); padding: 4px 12px; letter-spacing: .02em; }
.nav a {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 6px 10px; border-radius: var(--radius);
  color: var(--ink-2); text-decoration: none; font-weight: 500; transition: background var(--dur-fast), color var(--dur-fast);
}
.nav a img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 2px solid #000; flex: none; }
.nav a .nav__icon { width: 34px; height: 34px; display: grid; place-items: center; flex: none; }
.nav a .nav__icon img { border: 0; border-radius: 0; width: 28px; height: 28px; object-fit: contain; }
.nav a .nav__n { margin-inline-start: auto; font-size: 12px; color: var(--ink-3); }
@media (hover: hover) { .nav a:hover { background: rgba(255,255,255,.06); color: #fff; } }
.nav a[aria-current="page"] { background: var(--gold); color: var(--gold-ink); font-weight: 700; }
.nav a[aria-current="page"] .nav__n { color: var(--gold-ink); }

.main { margin-inline-start: var(--side); padding: 32px clamp(16px, 3vw, 40px) 64px; min-height: 100dvh; outline: none; }

/* ---------- home ---------- */
.home { display: grid; justify-items: center; text-align: center; padding-top: clamp(24px, 8vh, 90px); }
.home__crown { width: 150px; height: 150px; object-fit: contain; filter: drop-shadow(4px 4px 0 #000); }
.home__title { margin: 6px 0 0; font: 900 64px/1 Heebo, sans-serif; color: var(--gold); text-shadow: 4px 4px 0 #000; }
.home__sub { margin: 8px 0 24px; color: var(--ink-2); font-size: 18px; }
.home__actions { display: flex; gap: 12px; margin-top: 16px; flex-wrap: wrap; justify-content: center; }
.home__actions .btn { min-width: 170px; min-height: 52px; font-size: 17px; }
.home__hint { color: var(--ink-3); font-size: 14px; margin-top: 14px; }

.search { position: relative; width: min(440px, 100%); }
.search input {
  width: 100%; height: 52px; padding: 0 18px 0 56px; border: 2px solid #000; border-radius: var(--radius);
  background: var(--paper); color: #1a0d40; font-size: 17px; box-shadow: var(--shadow);
}
.search input::placeholder { color: #7a6ea0; }
.search__btn { position: absolute; inset-block: 4px; inset-inline-end: 4px; width: 44px; border: 0; background: transparent; display: grid; place-items: center; }
.search__btn img { width: 30px; height: 30px; }
.search--small { width: min(320px, 100%); }
.search--small input { height: 44px; font-size: 16px; }

/* ---------- grids ---------- */
.view__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.view__title { margin: 0; font: 900 40px/1.1 Heebo, sans-serif; color: var(--gold); text-shadow: 3px 3px 0 #000; }
.view__count { color: var(--ink-3); margin: 6px 0 18px; font-size: 14px; min-height: 21px; }
.feed { margin-top: 56px; }
.feed__title { font: 900 26px/1 Heebo, sans-serif; color: var(--ink-2); margin: 0 0 16px; }
/* "כל הממים" header: the title, a quiet note on the order, and "ערבוב" at the far end (16.11.2026) */
.feed__head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 12px; margin: 0 0 16px; }
.feed__head .feed__title { grid-column: 1; grid-row: 1; margin: 0; }
.feed__note { grid-column: 1; grid-row: 2; margin: 0; min-height: 32px; display: flex; align-items: center; flex-wrap: wrap;
  color: var(--ink-3); font-size: 14px; }   /* its own line under the title: the header never changes height */
.feed__head .shufflebtn { grid-column: 2; grid-row: 1 / span 2; }
.feed__back { min-height: 32px; padding: 0 6px; border: 0; background: none; color: var(--gold); font: inherit; font-weight: 700;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.shufflebtn { display: inline-flex; align-items: center; gap: 6px; }
.shufflebtn img { width: 22px; height: 22px; }
@keyframes gm-spin { to { rotate: 360deg; } }
@media (prefers-reduced-motion: no-preference) { .shufflebtn.is-spin img { animation: gm-spin 520ms var(--ease-out); } }

.grid { columns: 4 220px; column-gap: 14px; }
/* tiles and cards are inline-block (the Safari shadow fix), so the browser's default orphans/widows of 2 lines kept
   2-3 cards all in the first column (Daniel's phone, 16.11.2026: two community memes stacked on one side) */
.grid, .grid--picker, .nowtopic__grid { orphans: 1; widows: 1; }
.tile {   /* inline-block: Safari otherwise carries a tile's shadow to the top of the next column (16.11.2026) */
  display: inline-block; vertical-align: top; width: 100%; margin: 0 0 14px; padding: 0; border: 2px solid #000; border-radius: var(--radius);
  background: var(--violet-3); box-shadow: var(--shadow); overflow: hidden; break-inside: avoid; position: relative;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.tile img { width: 100%; height: auto; opacity: 0; transition: opacity var(--dur-base) var(--ease-out); }
.tile img.is-in { opacity: 1; }
.tile__name {
  position: absolute; inset-inline: 0; bottom: 0; padding: 18px 8px 6px; font-size: 13px; font-weight: 700; text-align: start;
  background: linear-gradient(transparent, rgba(0,0,0,.75)); color: #fff; opacity: 0; transition: opacity var(--dur-fast);
}
@media (hover: hover) {
  .tile:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 #000; }
  .tile:hover .tile__name { opacity: 1; }
}
.tile:active { transform: translate(1px, 1px); box-shadow: 2px 2px 0 #000; }
.empty { text-align: center; padding: 48px 16px; color: var(--ink-2); display: grid; gap: 14px; justify-items: center; }
.empty strong { font-size: 20px; color: #fff; }

/* ---------- dialogs ---------- */
dialog {
  border: 2px solid #000; padding: 0; color: var(--ink); background: var(--violet);
  box-shadow: var(--shadow-lg); border-radius: 10px;
  opacity: 0; transform: translateY(var(--rise)) scale(var(--scale-in));
  transition: opacity var(--dur-base) var(--ease-in), transform var(--dur-base) var(--ease-in), overlay var(--dur-base) allow-discrete, display var(--dur-base) allow-discrete;
}
dialog[open] { opacity: 1; transform: none; transition-duration: var(--dur-medium); transition-timing-function: var(--ease-out); }
@starting-style { dialog[open] { opacity: 0; transform: translateY(var(--rise)) scale(var(--scale-in)); } }
dialog::backdrop { background: rgba(10, 4, 30, .7); opacity: 0; transition: opacity var(--dur-base), overlay var(--dur-base) allow-discrete, display var(--dur-base) allow-discrete; }
dialog[open]::backdrop { opacity: 1; }
@starting-style { dialog[open]::backdrop { opacity: 0; } }
html.has-modal { overflow: hidden; }

.editor { width: min(1180px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; }
.editor__bar { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 2px solid #000; background: var(--violet-2); position: sticky; top: 0; z-index: 3; }
.editor__title { margin: 0; font-size: 18px; text-align: center; }
.editor__undo { display: flex; }
.editor__body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 400px); gap: 20px; padding: 20px; align-items: start; }

.stage {
  position: relative; display: grid; place-items: center; background: #1b0b45 repeating-conic-gradient(#21104f 0 25%, #1b0b45 0 50%) 0 0 / 24px 24px;
  border: 2px solid #000; border-radius: var(--radius); min-height: 280px; padding: 12px; touch-action: none;
}
.stage canvas { display: block; max-width: 100%; box-shadow: var(--shadow); cursor: default; touch-action: none; }
.stage canvas.is-hover { cursor: grab; }
.stage canvas.is-drag { cursor: grabbing; }

.crop { position: absolute; pointer-events: none; }
.crop__rect { position: absolute; border: 2px dashed var(--gold); box-shadow: 0 0 0 9999px rgba(0,0,0,.55); pointer-events: auto; cursor: move; touch-action: none; }
.crop__rect span { position: absolute; width: 26px; height: 26px; background: var(--gold); border: 2px solid #000; touch-action: none; }
.crop__rect span[data-h="nw"] { top: -13px; left: -13px; cursor: nwse-resize; }
.crop__rect span[data-h="ne"] { top: -13px; right: -13px; cursor: nesw-resize; }
.crop__rect span[data-h="sw"] { bottom: -13px; left: -13px; cursor: nesw-resize; }
.crop__rect span[data-h="se"] { bottom: -13px; right: -13px; cursor: nwse-resize; }
.stage.is-cropping { overflow: hidden; }


.imgmenu { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px; border: 2px solid #000; border-radius: var(--radius); background: var(--violet-2); }
.opts { display: grid; gap: 10px; }
.opt { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 15px; }
.opt > span { min-width: 92px; color: var(--ink-2); }
.opt select, .opt input[type="color"] { height: 38px; border: 2px solid #000; border-radius: 4px; background: var(--violet-3); padding: 0 8px; }
.opt input[type="range"] { flex: 1; min-width: 120px; accent-color: var(--gold); }
.cropbar { display: grid; gap: 12px; padding: 12px; border: 2px solid var(--gold); border-radius: var(--radius); background: var(--violet-2); }
.cropbar p { margin: 0; color: var(--ink-2); }
.cropbar__bright { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cropbar__bright label { font-weight: 700; }
.cropbar__bright input[type="range"] { flex: 1 1 140px; min-width: 110px; accent-color: var(--gold); }
.cropbar__bright output { min-width: 3ch; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }

.similar { padding: 0 20px 20px; }
.similar h3 { margin: 0 0 10px; font-size: 16px; color: var(--ink-2); }
.similar__row { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.similar__row .tile { margin: 0; aspect-ratio: 1; }
.similar__row .tile img { height: 100%; object-fit: cover; }

.small { width: min(460px, calc(100vw - 32px)); padding: 20px; }
.small h2 { margin: 0 0 16px; }
.small > .btn { margin-top: 16px; width: 100%; }
.blank__opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.blank__opt { display: grid; justify-items: center; align-content: end; gap: 8px; height: 130px; padding: 10px; border: 2px solid #000; border-radius: var(--radius); background: var(--violet-3); box-shadow: var(--shadow); font-weight: 700; }
.blank__opt .ratio { height: 70px; max-width: 90%; background: #fff; border: 2px solid #000; }
@media (hover: hover) { .blank__opt:hover { background: var(--purple); } }

.picker { width: min(980px, calc(100vw - 32px)); height: calc(100dvh - 48px); overflow: hidden; }
.picker[open] { display: grid; grid-template-rows: auto auto 1fr; }
.picker .search { margin: 12px auto; }
.grid--picker { overflow-y: auto; padding: 0 16px 16px; columns: 5 150px; }

.toast {
  position: fixed; inset-inline: 0; margin-inline: auto; bottom: max(20px, env(safe-area-inset-bottom)); width: max-content; max-width: calc(100vw - 32px);
  z-index: 1000; background: var(--gold); color: var(--gold-ink); border: 2px solid #000; border-radius: var(--radius);
  padding: 10px 18px; font-weight: 700; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(var(--rise)); transition: opacity var(--dur-base) var(--ease-in), transform var(--dur-base) var(--ease-in);
}
.toast.is-in { opacity: 1; transform: none; transition-duration: var(--dur-medium); transition-timing-function: var(--ease-out); }
.drop { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; background: rgba(56, 24, 131, .9); border: 6px dashed var(--gold); pointer-events: none; }
.drop p { font: 900 34px Heebo, sans-serif; color: var(--gold); text-shadow: 3px 3px 0 #000; }
.scrim { display: none; }

.nav a.nav__sub { min-height: 40px; padding-inline-start: 26px; font-size: 15px; }
.nav a.nav__sub--2 { padding-inline-start: 44px; font-size: 14px; }
.nav a.nav__sub img { width: 28px; height: 28px; }
.crumbs { margin: 4px 0 0; font-size: 14px; color: var(--ink-3); }
.crumbs a { color: var(--ink-2); font-weight: 700; text-decoration: none; }
@media (hover: hover) { .crumbs a:hover { color: var(--gold); text-decoration: underline; } }
.subcats { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.subcat { display: inline-flex; align-items: center; min-height: 40px; padding: 4px 14px; border: 2px solid #000; border-radius: var(--radius);
  background: var(--violet-3); color: var(--ink); font-weight: 700; text-decoration: none; box-shadow: var(--shadow); }
@media (hover: hover) { .subcat:hover { background: var(--purple); } }
/* ---------- motion: home entrance, breathing title, drifting texture, page swaps (Daniel 16.11.2026) ----------
   Separate channels: entrances use opacity/translate, the loops use scale/rotate/translate on their own elements,
   so nothing overwrites anything. Everything here is off under reduced motion. */
@keyframes gm-crown-in { from { opacity: 0; translate: 0 -48px; scale: .6; rotate: -16deg; } 55% { opacity: 1; } to { opacity: 1; translate: 0 0; scale: 1; rotate: 0deg; } }
@keyframes gm-float { from { translate: 0 0; rotate: -3deg; } to { translate: 0 -9px; rotate: 3deg; } }
@keyframes gm-rise { from { opacity: 0; translate: 0 var(--from, 14px); } to { opacity: 1; translate: 0 0; } }
@keyframes gm-title-in { from { opacity: 0; translate: 0 .45em; scale: .9; } to { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes gm-breathe { from { scale: 1; } to { scale: 1.04; } }
@keyframes gm-pop { from { opacity: 0; scale: .82; } to { opacity: 1; scale: 1; } }
@keyframes gm-drift { from { translate: 0 0; } to { translate: -3% 2.5%; } }
@keyframes gm-vt-out { to { opacity: 0; } }
@keyframes gm-vt-in { from { opacity: 0; translate: 0 12px; } }
.home__title { transform-origin: 50% 65%; }
.home .search, .view__head .search { view-transition-name: gm-search; }
.home__title, .view__title { view-transition-name: gm-title; }
@media (prefers-reduced-motion: no-preference) {
  body::before { inset: -6%; animation: gm-drift 48s var(--ease-in-out) infinite alternate; }
  .home__crown { animation: gm-float 3.4s var(--ease-in-out) infinite alternate; }
  .home__title { animation: gm-breathe 2.8s var(--ease-in-out) infinite alternate; }
  .home.is-intro .home__crown { animation: gm-crown-in 900ms var(--ease-pop) both, gm-float 3.4s var(--ease-in-out) 900ms infinite alternate; }
  .home.is-intro .home__title { animation: gm-title-in 760ms var(--ease-out) 150ms both, gm-breathe 2.8s var(--ease-in-out) 910ms infinite alternate; }
  .home.is-intro .home__sub { --from: 10px; animation: gm-rise 560ms var(--ease-out) 320ms both; }
  .home.is-intro .search { animation: gm-rise 600ms var(--ease-out) 420ms both; }
  .home.is-intro .home__actions > * { animation: gm-pop 520ms var(--ease-pop) both; }
  .home.is-intro .home__actions > :nth-child(1) { animation-delay: 540ms; }
  .home.is-intro .home__actions > :nth-child(2) { animation-delay: 600ms; }
  .home.is-intro .home__hint { --from: 6px; animation: gm-rise 560ms var(--ease-out) 700ms both; }
  .feed.is-intro .feed__title { animation: gm-rise 560ms var(--ease-out) 720ms both; }
  .feed.is-intro .tile { animation: gm-rise 640ms var(--ease-out) both; animation-delay: calc(780ms + var(--i, 0) * 40ms); }
  /* page swaps: the old page leaves fast, the new one arrives; the search box and the title travel */
  ::view-transition-old(root) { animation: gm-vt-out 200ms var(--ease-in) both; }
  ::view-transition-new(root) { animation: gm-vt-in 420ms var(--ease-out) both; }
  ::view-transition-group(gm-search), ::view-transition-group(gm-title) { animation-duration: 560ms; animation-timing-function: var(--ease-in-out); }
  /* typing in search: the page stays still, only the result tiles glide to their new places */
  html.vt-grid::view-transition-old(root), html.vt-grid::view-transition-new(root) { animation: none; }
  html.vt-grid::view-transition-group(gm-search), html.vt-grid::view-transition-group(gm-title) { animation: none; }
  html.vt-grid::view-transition-group(*) { animation-duration: 380ms; animation-timing-function: var(--ease-out); }
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

.readyrow { margin-top: 40px; }
.cropbar__bright label { min-width: 4.6em; }

/* ---------- community (gm-community.js) ---------- */
.crownbtn { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; min-width: 44px; padding: 2px 10px;
  border: 2px solid #000; border-radius: 999px; background: var(--violet-3); color: var(--ink); font-weight: 900; box-shadow: 2px 2px 0 #000;
  transition: background var(--dur-fast) var(--ease-out), transform var(--dur-instant) var(--ease-out); }
.crownbtn img { width: 22px; height: 22px; }
.crownbtn[aria-pressed="true"] { background: var(--gold); color: var(--gold-ink); }
.crownbtn:active { transform: scale(var(--press)); }
.crownbtn--bar { margin-inline-end: 6px; }
.crownbtn--big { min-height: 44px; padding: 4px 16px; font-size: 18px; }
.crownbtn--big img { width: 28px; height: 28px; }
@keyframes gm-crown-pop { 40% { scale: 1.18; rotate: -8deg; } to { scale: 1; rotate: 0deg; } }
@media (prefers-reduced-motion: no-preference) { .crownbtn.is-pop img { animation: gm-crown-pop 420ms var(--ease-pop); } }
.tile__crown { position: absolute; top: 6px; inset-inline-end: 6px; display: inline-flex; align-items: center; gap: 2px; padding: 1px 7px 1px 5px;
  border: 2px solid #000; border-radius: 999px; background: var(--gold); color: var(--gold-ink); font-size: 13px; font-weight: 900; box-shadow: 2px 2px 0 #000; }
.tile__crown img { width: 16px; height: 16px; }
.editor__crown { display: inline-flex; }
.ctabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.ctabs button { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 4px 14px; border: 2px solid #000;
  border-radius: var(--radius); background: var(--violet-3); color: var(--ink); font-weight: 700; box-shadow: var(--shadow); }
.ctabs button img { width: 24px; height: 24px; }
.ctabs button[aria-selected="true"] { background: var(--gold); color: var(--gold-ink); }
.ccard { display: inline-block; vertical-align: top; width: 100%; margin: 0 0 14px; border: 2px solid #000; border-radius: var(--radius); background: var(--violet-3); box-shadow: var(--shadow);
  overflow: hidden; break-inside: avoid; }   /* inline-block: Safari otherwise carries the card's shadow to the top of the next column */
.ccard__pic { position: relative; display: block; width: 100%; padding: 0; border: 0; background: #1b0b45; }
.ccard__pic img { display: block; width: 100%; height: auto; }
/* a slim bar under the picture (16.11.2026, Daniel: "the bottom part is way too heavy"): ~30 px, a quiet crown with a
   full-size touch area, a soft nickname (none when there is no nickname) */
.ccard__bar { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 30px;
  padding-block: 2px; padding-inline: 10px 3px; border-top: 2px solid #000; }
.ccard__nick { font-weight: 700; font-size: 12.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ccard__nick:empty { display: none; }
.crownbtn--card { position: relative; min-height: 26px; min-width: 0; padding: 1px 8px; gap: 3px; margin-inline-start: auto;
  border: 0; box-shadow: none; background: transparent; font-size: 13px; }
.crownbtn--card img { width: 18px; height: 18px; }
.crownbtn--card::after { content: ''; position: absolute; inset: -9px -4px; }      /* a 44 px target without the bulk */
.crownbtn--card[aria-pressed="true"] { background: var(--gold); color: var(--gold-ink); }
@media (hover: hover) { .crownbtn--card:hover { background: rgba(255, 255, 255, .1); } .crownbtn--card[aria-pressed="true"]:hover { background: var(--gold); } }
.ccard__rank { position: absolute; top: 8px; inset-inline-start: 8px; display: grid; place-items: center; width: 34px; height: 34px;
  border: 2px solid #000; border-radius: 50%; background: var(--gold); color: var(--gold-ink); font: 900 18px/1 Heebo, sans-serif; box-shadow: 2px 2px 0 #000; }
.ccard--r2 .ccard__rank { background: #d9dce3; }
.ccard--r3 .ccard__rank { background: #e6a15c; }
.ccard--r1 { border-color: var(--gold); }
.examples__row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.examples__row .ccard { margin: 0; }
.viewer { width: min(560px, calc(100vw - 24px)); padding: 12px; }
.viewer__img { display: block; width: 100%; height: auto; max-height: 64dvh; object-fit: contain; border: 2px solid #000; border-radius: var(--radius); background: #1b0b45; }
.viewer__bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 0 6px; }
.viewer__nick { margin: 0; font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer__more { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.viewer__report { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; border: 0; background: transparent; color: var(--ink-3); font-weight: 700; }
.viewer__report img { width: 22px; height: 22px; }
.viewer__reasons { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; color: var(--ink-2); }
.sharedlg { width: min(440px, calc(100vw - 24px)); padding: 16px; }
.sharedlg h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 20px; }
.sharedlg h2 img { width: 32px; height: 32px; }
.sharedlg__img { display: block; max-width: 100%; max-height: 34dvh; margin: 0 auto 10px; border: 2px solid #000; border-radius: var(--radius); }
.sharedlg__note { margin: 0 0 10px; color: var(--ink-2); font-size: 14px; }
.sharedlg__agree { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0; font-size: 14px; }
.sharedlg__agree input { width: 20px; height: 20px; flex: none; accent-color: var(--gold); }
.sharedlg__never { display: flex; gap: 8px; align-items: center; justify-content: center; margin: 10px 0 0; min-height: 40px; font-size: 13px; color: var(--ink-3); }
.sharedlg__never[hidden] { display: none; }
.sharedlg__never input { width: 18px; height: 18px; flex: none; accent-color: var(--gold); }

/* ---------- עכשיו בארץ (gm-now.js) ---------- */
.nowpage { display: grid; gap: 34px; margin-top: 8px; }
.nowtopic__title { margin: 0; font: 900 26px/1.15 Heebo, sans-serif; color: var(--gold); text-shadow: 2px 2px 0 #000; }
.nowtopic__note { margin: 6px 0 12px; color: var(--ink-2); }
.nowtopic__grid { columns: 3 200px; }
.nowtopic__make { margin-top: 4px; }
.nowquiet { display: grid; justify-items: center; gap: 10px; padding: 40px 16px; text-align: center; color: var(--ink-2); font-size: 18px; }
.nowquiet img { width: 72px; height: 72px; }
.nowcard { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; width: min(560px, 100%); margin-top: 22px;
  padding: 10px 12px; border: 2px solid #000; border-radius: var(--radius); background: var(--violet-3); box-shadow: var(--shadow);
  color: var(--ink); text-decoration: none; text-align: start;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out); }
@media (hover: hover) { .nowcard:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 #000; } }
.nowcard__icon { width: 48px; height: 48px; }
.nowcard__body { display: grid; gap: 2px; min-width: 0; }
.nowcard__kicker { font-size: 13px; font-weight: 700; color: var(--gold); }
.nowcard__title { font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nowcard__more { font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nowcard__thumbs { display: flex; }
.nowcard__thumbs img { width: 52px; height: 52px; object-fit: cover; border: 2px solid #000; border-radius: 4px; margin-inline-start: -14px; background: #1b0b45; }
.nowcard__thumbs img:first-child { margin-inline-start: 0; }
@media (max-width: 420px) { .nowcard__thumbs img:nth-child(n+3) { display: none; } }
@media (prefers-reduced-motion: no-preference) { .home.is-intro .nowcard { animation: gm-rise 560ms var(--ease-out) 760ms both; } }

/* bulk marking (admin-inline.js) */
.view__bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 8px 0 12px; }
.view__bar .view__count { margin: 0; }
.tile.is-picked { outline: 4px solid var(--gold); outline-offset: -4px; }
.tile.is-picked::after {
  content: '\2713'; position: absolute; top: 8px; inset-inline-start: 8px; width: 30px; height: 30px; display: grid; place-items: center;
  border: 2px solid #000; border-radius: 50%; background: var(--gold); color: var(--gold-ink); font-weight: 900; box-shadow: 2px 2px 0 #000;
}
body.is-picking .tile:not(.is-picked) img { opacity: .78; }
body.is-picking .main { padding-bottom: 150px; }
.pickbar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 900; display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap;
  padding: 10px 16px max(10px, env(safe-area-inset-bottom)); background: var(--violet-2); border-top: 2px solid #000;
  box-shadow: 0 -3px 0 rgba(0, 0, 0, .35);
}
@media (min-width: 821px) { .pickbar { inset-inline-start: var(--side); } }
.pickbar__count { margin: 0; font-weight: 700; flex: 1 1 auto; }
.pickbar__btns { display: flex; flex-wrap: wrap; gap: 8px; }
.pickbar .btn:disabled { opacity: .45; }
.pickcats__list { display: grid; gap: 6px; max-height: min(60dvh, 520px); overflow-y: auto; overscroll-behavior: contain; padding: 2px; }
.pickcat { min-height: 44px; padding: 6px 12px; border: 2px solid #000; border-radius: var(--radius); background: var(--violet-3);
  color: var(--ink); font-weight: 700; text-align: start; }
@media (hover: hover) { .pickcat:hover { background: var(--purple); } }
.toast__btn { margin-inline-start: 12px; padding: 2px 10px; border: 2px solid #000; border-radius: 4px; background: #fff; color: var(--gold-ink); font-weight: 900; }

/* admin on the site: the full admin editor in a full-screen frame */
.manage-frame { width: 100vw; height: 100dvh; max-width: 100vw; max-height: 100dvh; margin: 0; padding: 0; border: 0; border-radius: 0;
  background: var(--violet); box-shadow: none; }
.manage-frame iframe { display: block; width: 100%; height: 100%; border: 0; background: var(--violet); transition: opacity var(--dur-fast, 160ms) var(--ease-out); }
/* until the admin says its editor is ready: the frame stays invisible, a quiet loader shows only if it takes a while */
.manage-frame.is-loading iframe { opacity: 0; pointer-events: none; }
.manage-frame__wait { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px;
  color: var(--ink-2); font-weight: 700; opacity: 0; pointer-events: none; transition: opacity var(--dur-fast, 160ms) var(--ease-out); }
.manage-frame.is-loading .manage-frame__wait { opacity: 1; transition-delay: 220ms; }
.manage-frame__wait img { width: 84px; height: 84px; }
@media (prefers-reduced-motion: no-preference) { .manage-frame__wait img { animation: gm-float 1.6s var(--ease-in-out, ease-in-out) infinite alternate; } }
/* admin sheet (admin-inline.js, only for a logged-in admin) */
.editor__admin { margin-inline-end: 6px; min-height: 36px; }
.adsheet { width: min(440px, calc(100vw - 24px)); padding: 16px 16px 10px; }
.adsheet h2 { margin: 0 0 10px; font-size: 20px; }
.adsheet__form { display: grid; gap: 10px; }
.adsheet__f { display: grid; gap: 4px; }
.adsheet__f > span { font-size: 13px; color: var(--ink-3); }
.adsheet__f input, .adsheet__f select { height: 40px; border: 2px solid #000; border-radius: var(--radius); padding: 0 10px; min-width: 0; }
.adsheet__f input { background: var(--paper); color: #1a0d40; }
.adsheet__f select { background: var(--violet-3); }
.adsheet__f select:disabled { opacity: .5; }
.adsheet__tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.adsheet__more-tags { border: 2px solid #000; border-radius: var(--radius); background: var(--violet-2); padding: 0 10px; }
.adsheet__more-tags summary { min-height: 40px; display: flex; align-items: center; gap: 6px; font-weight: 700; cursor: pointer; list-style: none; }
.adsheet__more-tags summary::-webkit-details-marker { display: none; }
.adsheet__more-tags summary::after { content: '▾'; margin-inline-start: auto; color: var(--ink-3); transition: transform var(--dur-fast) var(--ease-out); }
.adsheet__more-tags[open] summary::after { transform: rotate(180deg); }
.adsheet__more-tags input { width: 100%; height: 40px; margin-bottom: 10px; border: 2px solid #000; border-radius: var(--radius); padding: 0 10px; background: var(--paper); color: #1a0d40; }
.adsheet__note { margin: 0; font-size: 13px; color: var(--ink-2); }
.adsheet .seg { display: flex; }
.adsheet .seg button { flex: 1; }
.adsheet__err { margin: 0; color: #ffd0d0; font-weight: 700; }
.adsheet__err:empty { display: none; }
.adsheet__err a { color: var(--gold); }
.adsheet__actions { display: flex; gap: 8px; }
.adsheet__actions .btn { flex: 1; }
.adsheet__more { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.adsheet__more a { color: var(--ink-2); font-weight: 700; min-height: 44px; display: inline-flex; align-items: center; }
.adsheet__remove { border: 0; background: transparent; color: #ffb4b4; font-weight: 700; text-decoration: underline; min-height: 44px; padding: 0 4px; }
.adsheet__remove:disabled { opacity: .5; cursor: progress; }
.gmcats { display: grid; gap: 6px; }
.gmcats__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.gmcats__chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 8px; border: 1.5px solid #000; border-radius: 4px; background: var(--purple); font-size: 13px; font-weight: 700; }
.gmcats__chip button { border: 0; background: transparent; padding: 0 6px; font-size: 16px; line-height: 1; min-height: 28px; }
.gmcats__add { height: 40px; border: 2px dashed var(--ink-3); border-radius: var(--radius); background: transparent; padding: 0 8px; }
.gmcats__add option { background: var(--violet-3); }
.gmcats__add:disabled { opacity: .5; }
.about__admin { margin: 14px 0 0; font-size: 13px; text-align: center; }
.about__admin a { color: var(--ink-3); }
.nav__about { display: block; width: 100%; min-height: 44px; padding: 6px 10px; text-align: start; background: none; border: 0; border-radius: var(--radius); color: var(--ink-3); font-weight: 500; }
@media (hover: hover) { .nav__about:hover { background: rgba(255,255,255,.06); color: #fff; } }
/* the legal pages, at the bottom of the menu (16.11.2026) */
.nav__legal { display: flex; flex-wrap: wrap; gap: 0 14px; padding: 6px 10px 18px; font-size: 13px; }
.nav__legal a { display: inline-block; padding: 5px 0; color: var(--ink-3); }
@media (hover: hover) { .nav__legal a:hover { color: #fff; } }
.about__legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 14px; margin: 4px 0 14px; font-size: 14px; }
.about .about__legal a { color: var(--ink-2); font-weight: 500; padding: 4px 0; }
.editor__report { margin: 0; padding: 4px 16px 18px; text-align: center; font-size: 13px; }
.editor__report a { color: var(--ink-3); display: inline-block; padding: 6px 4px; }
.about p { margin: 0 0 10px; color: var(--ink-2); }
.about ul { margin: 0 0 14px; padding-inline-start: 20px; display: grid; gap: 6px; }
.about a { color: var(--gold); font-weight: 700; }
/* who made it (Daniel 16.11.2026: "show my logo and a link to my website, say I created it") */
.about .about__maker { display: grid; justify-items: center; gap: 6px; margin: 4px 0 16px; padding: 16px 12px 12px;
  border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); background: rgba(255,255,255,.04);
  color: var(--ink-2); font-weight: 500; text-decoration: none; transition: background .16s var(--ease-out, ease), border-color .16s; }
.about__maker img { width: 176px; height: auto; margin-bottom: 4px; }
.about__made { font-size: 15px; }
.about__site { color: var(--gold); font-weight: 700; font-size: 14px; }
@media (hover: hover) { .about .about__maker:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.22); } }
.about .about__maker:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* clearer editor controls (15.11.2026) */
.stagewrap { display: grid; gap: 8px; align-content: start; }
.stage__hint { margin: 0; font-size: 14px; color: var(--ink-2); }
.stage canvas.is-resize { cursor: ew-resize; }
.opt--stack { display: grid; gap: 6px; }
.seg { display: inline-flex; border: 2px solid #000; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--violet-3); }
.seg button { min-height: 40px; padding: 4px 14px; border: 0; border-inline-start: 2px solid #000; background: transparent; color: var(--ink); font-weight: 700; }
.seg button:first-child { border-inline-start: 0; }
.seg button[aria-pressed="true"] { background: var(--gold); color: var(--gold-ink); }
@media (hover: hover) { .seg button:not([aria-pressed="true"]):hover { background: rgba(255,255,255,.08); } }
.seg--sm { box-shadow: none; }
.seg--sm button { min-height: 34px; padding: 2px 10px; font-size: 14px; }
/* ---------- editor panel (16.11.2026): one tool row, text chips, one active text ---------- */
.panel { display: grid; gap: 10px; }
#mainControls { display: grid; gap: 10px; }
.edbar { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }   /* as many columns as tools shown */
.edbar .tool[hidden] { display: none; }
.tool { display: grid; justify-items: center; align-content: center; gap: 2px; min-height: 62px; padding: 6px 2px;
  border: 2px solid #000; border-radius: var(--radius); background: var(--purple); color: #fff; font-weight: 700; font-size: 13px;
  box-shadow: var(--shadow); transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out); }
.tool img { width: 28px; height: 28px; object-fit: contain; }
.tool--gold { background: var(--gold); color: var(--gold-ink); }
.tool[aria-pressed="true"] { background: #ff6b1a; }
.tool:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #000; transition-duration: var(--dur-instant); }
@media (hover: hover) { .tool:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 #000; } }
.tchips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-height: 34px; max-width: 48%; padding: 2px 12px; border: 2px solid #000; border-radius: var(--radius); background: var(--violet-3);
  color: var(--ink); font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--gold); color: var(--gold-ink); }
.chip--add { background: transparent; border-style: dashed; border-color: var(--ink-3); color: var(--ink-2); }
.texts { display: grid; }
.tbox { display: none; gap: 8px; padding: 8px; border: 2px solid var(--gold); border-radius: var(--radius); background: var(--violet-3); }
.tbox.is-active { display: grid; }
.tbox textarea { width: 100%; min-height: 46px; max-height: 96px; resize: none; border: 2px solid #000; border-radius: 4px; padding: 8px 10px;
  background: var(--paper); color: #1a0d40; font-size: 17px; line-height: 1.35; }
.tbox textarea:placeholder-shown { direction: rtl; text-align: right; }   /* empty: Hebrew side, cursor on the right; typing still picks its own direction (dir=auto) */
.tbox__row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ctl, .stepper { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 10px;
  border: 2px solid #000; border-radius: 4px; background: var(--violet); color: var(--ink); font-size: 14px; font-weight: 700; }
.ctl[aria-pressed="true"] { background: var(--gold); color: var(--gold-ink); }
.ctl--danger { margin-inline-start: auto; background: transparent; border-color: rgba(255, 107, 107, .75); color: #ffd0d0; }
.ctl--color input[type="color"] { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.ctl .swatch { width: 18px; height: 18px; border: 2px solid #000; border-radius: 50%; }
.stepper { padding: 0; gap: 0; overflow: hidden; }
.stepper__b { width: 38px; min-height: 32px; border: 0; background: transparent; color: var(--ink); font-size: 20px; font-weight: 900; }
.stepper__b:active { background: rgba(255, 255, 255, .14); }
.stepper__l { display: grid; place-items: center; min-height: 32px; padding: 0 6px; border-inline: 2px solid #000; font-size: 14px; }
.outline { display: inline-flex; }
.outline > .ctl:first-child { border-start-end-radius: 0; border-end-end-radius: 0; }
.outline > .ctl--color { padding: 0 8px; border-inline-start: 0; border-start-start-radius: 0; border-end-start-radius: 0; }
.tbox__icons { display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 4px; }
.ibtn { position: relative; display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; flex: none;
  border: 2px solid #000; border-radius: 4px; background: var(--violet); cursor: pointer; }
.ibtn img { width: 24px; height: 24px; object-fit: contain; pointer-events: none; }
.ibtn[aria-pressed="true"] { background: var(--gold); }
.ibtn:active { transform: translate(1px, 1px); }
.ibtn--danger { border-color: rgba(255, 107, 107, .75); background: transparent; }
.ibtn-group { display: inline-flex; flex: none; }
.ibtn-group > .ibtn { border-radius: 0; }
.ibtn-group > .ibtn + .ibtn { border-inline-start: 0; }
.ibtn-group > .ibtn:first-child { border-start-start-radius: 4px; border-end-start-radius: 4px; }
.ibtn-group > .ibtn:last-child { border-start-end-radius: 4px; border-end-end-radius: 4px; }
.ibtn--color input[type="color"], .ibtn--swatch input[type="color"] { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.ibtn__dot { position: absolute; inset-inline-end: 2px; bottom: 2px; width: 11px; height: 11px; border: 2px solid #000; border-radius: 50%; }
.ibtn--swatch { width: 26px; }
.ibtn__dot--big { position: static; width: 14px; height: 14px; }
@media (hover: hover) { .ibtn:hover { background: var(--violet-3); } .ibtn[aria-pressed="true"]:hover { background: var(--gold); } }
.seg--band { display: flex; width: 100%; box-shadow: none; }
.seg--band button { flex: 1; min-height: 36px; padding: 2px 6px; font-size: 13px; }
.extras { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- tablet ---------- */
@media (max-width: 1100px) {
  .editor__body { grid-template-columns: minmax(0, 1fr); }
  .stage canvas { max-height: 62dvh; }
}

/* ---------- phone ---------- */
@media (max-width: 820px) {
  :root { --side: 0px; }
  .topbar {
    display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 15;
    padding: 8px 16px; padding-top: max(8px, env(safe-area-inset-top)); background: var(--violet-2); border-bottom: 2px solid #000;
  }
  .topbar__home { display: flex; align-items: center; gap: 8px; color: var(--gold); text-decoration: none; font: 900 22px/1 Heebo, sans-serif; text-shadow: 2px 2px 0 #000; }
  .burger, .burger::before, .burger::after { display: block; width: 22px; height: 3px; background: #fff; border-radius: 2px; position: relative; }
  .burger::before, .burger::after { content: ""; position: absolute; inset-inline-start: 0; }
  .burger::before { top: -7px; } .burger::after { top: 7px; }
  .sidebar {
    width: min(320px, 86vw); transform: translateX(calc(100% * -1 * var(--dir)));
    transition: transform var(--dur-base) var(--ease-in); visibility: hidden;
    padding-top: max(16px, env(safe-area-inset-top));
  }
  .sidebar.is-open { transform: none; visibility: visible; transition-duration: var(--dur-medium); transition-timing-function: var(--ease-out); }
  .sidebar:not(.is-open) { transition: transform var(--dur-base) var(--ease-in), visibility 0s var(--dur-base); }
  .scrim { display: block; position: fixed; inset: 0; z-index: 19; background: rgba(10,4,30,.6); opacity: 0; transition: opacity var(--dur-base); }
  .scrim.is-in { opacity: 1; }
  .main { margin: 0; padding: 20px 16px 48px; }
  .home { padding-top: 12px; }
  .home__crown { width: 110px; height: 110px; }
  .home__title { font-size: 46px; }
  .home__actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .home__actions .btn { min-width: 0; }
  .grid { columns: 2 140px; }
  .view__title { font-size: 26px; }
  .search--small { width: 100%; }
  /* tighter on the phone so more memes show (16.11.2026, Daniel: "all the buttons and all the spacing tighter") */
  .main { padding-top: 14px; }
  .view__head { gap: 10px; }
  .ctabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 10px 0 0; }
  .ctabs button { justify-content: center; min-width: 0; min-height: 40px; padding: 2px 6px; gap: 4px; font-size: 14px; box-shadow: 2px 2px 0 #000; }
  .ctabs button img { width: 18px; height: 18px; flex: none; }
  .ctabs button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .subcats { gap: 6px; margin: 8px 0 0; }
  .crumbs { margin-top: 2px; }
  .view__bar { flex-wrap: nowrap; gap: 8px; margin: 8px 0; }
  .view__bar .view__count { flex: 1; min-width: 0; font-size: 13px; line-height: 1.35; min-height: 0; text-wrap: balance; }
  .view__bar .btn--sm { flex: none; min-height: 36px; padding: 2px 10px; font-size: 14px; }
  .grid { column-gap: 8px; }
  .tile, .ccard { margin-bottom: 8px; }

  .editor, .picker { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; border: 0; margin: 0; }
  .editor__body { padding: 8px 10px 12px; gap: 8px; }
  .stage__hint { display: none; }
  .stage { min-height: 0; padding: 4px; }
  .stage canvas { max-height: none; }
  .panel, #mainControls { gap: 8px; }
  .edbar { gap: 5px; }
  .tool { min-height: 56px; font-size: 12px; }
  .tool img { width: 24px; height: 24px; }
  .tbox { padding: 6px; gap: 6px; }
  .panel, #mainControls, .texts, .tbox, .tbox__icons { min-width: 0; }
  .tbox__icons { gap: 3px; }
  .ibtn { width: 32px; height: 34px; }
  .ibtn img { width: 22px; height: 22px; }
  .ibtn--swatch { width: 22px; }
  .editor__title { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .similar { padding: 0 16px 24px; }
  .similar__row { grid-template-columns: repeat(3, 1fr); }
  .grid--picker { columns: 3 100px; padding: 0 12px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  :root { --rise-sm: 0px; --rise: 0px; --scale-in: 1; --press: 1; --dur-medium: 160ms; }
  .btn, .tile { transition: none; }
}
.nowrap { white-space: nowrap; }

/* the narrowest phones: the three community tabs still fit in one row (16.11.2026) */
@media (max-width: 370px) {
  .ctabs button { font-size: 13px; padding: 2px 3px; gap: 3px; }
  .ctabs button img { width: 16px; height: 16px; }
}

/* install as an app (gm-install.js, 16.11.2026) */
.install { text-align: center; }
.install__crown { width: 84px; height: auto; margin: 0 auto 4px; }
.install h2 { margin: 0 0 6px; }
.install__lead { margin: 0 0 14px; color: var(--ink-2); text-wrap: balance; }
.install__done { margin: 0 0 14px; padding: 10px 12px; border: 2px solid #000; border-radius: var(--radius); background: rgba(255, 222, 89, .14); color: #fff; font-weight: 500; }
.install__now { width: 100%; margin: 0 0 14px; }
.install__seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 0 12px; }
.install__steps { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; text-align: start; counter-reset: step; }
.install__steps li { display: grid; grid-template-columns: 28px 44px minmax(0, 1fr); align-items: center; gap: 10px; padding: 10px 12px;
  border: 2px solid #000; border-radius: var(--radius); background: rgba(255, 255, 255, .06); counter-increment: step; color: var(--ink-2); line-height: 1.45; }
.install__steps li::before { content: counter(step); display: grid; place-items: center; width: 28px; height: 28px; border: 2px solid #000;
  border-radius: 50%; background: var(--gold); color: var(--gold-ink); font-weight: 900; }
.install__steps img { width: 44px; height: 44px; object-fit: contain; }
.install__steps b { color: #fff; }
.install__steps span { text-wrap: pretty; }
.install__actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; }
.topbar__end { display: flex; align-items: center; gap: 8px; }
.topbar__install img { width: 30px; height: 30px; }
.is-app .nav__install, .is-app .topbar__install { display: none !important; }
@media (display-mode: standalone) { .nav__install, .topbar__install { display: none !important; } }

/* search (16.11.2026, Daniel: "fun and intuitive and fast"): ideas under the bar; on the phone the bar sticks under
   the top bar on the results page, so it never has to be found again */
.search__hints, .empty__hints { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin: 10px 0 0; }
.search__hints { max-width: 460px; }
.search__try { color: var(--ink-3); font-size: 14px; margin-inline-end: 2px; }
.search__hints button, .empty__hints button { min-height: 36px; padding: 2px 14px; border: 1.5px solid rgba(255, 255, 255, .3); border-radius: 999px;
  background: rgba(255, 255, 255, .08); color: var(--ink); font-size: 14px; font-weight: 500; transition: background var(--dur-fast), transform var(--dur-instant); }
@media (hover: hover) { .search__hints button:hover, .empty__hints button:hover { background: rgba(255, 255, 255, .16); } }
.search__hints button:active, .empty__hints button:active { transform: scale(var(--press)); }
@media (max-width: 820px) {
  #view.is-search .view__title { display: none; }     /* the bar itself shows what was searched */
  #view.is-search .view__head { position: sticky; top: var(--topbar-h, 62px); z-index: 6; margin: -14px -16px 0; padding: 10px 16px 8px;
    background: var(--violet); box-shadow: 0 8px 10px -9px rgba(0, 0, 0, .7); }
}
@media (max-width: 380px) { .search__try { display: none; } }   /* four ideas stay on one row */

/* ---------- accounts (gm-user.js, 16.11.2026) ---------- */
/* the phone top bar: the menu on the right (Daniel: "I'm using my right thumb"), the brand beside it, the personal
   menu (a picture) at the far end */
.topbar { justify-content: flex-start; gap: 10px; }
.topbar__me { margin-inline-start: auto; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  border: 2px solid #000; background: var(--violet-3); box-shadow: 2px 2px 0 #000; overflow: hidden; flex: none; }
.topbar__me img { width: 100%; height: 100%; object-fit: cover; }
.topbar__me.is-in { border-color: var(--gold); }
.mecard { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 8px 10px; border: 2px solid #000; border-radius: var(--radius);
  background: var(--violet-3); color: var(--ink); text-decoration: none; box-shadow: 2px 2px 0 #000; }
.mecard img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 2px solid #000; background: var(--violet-2); flex: none; }
.mecard .mecard__rank { width: 26px; height: 26px; border: 0; border-radius: 0; background: none; object-fit: contain; margin-inline-start: auto; }
.mecard__t { display: grid; min-width: 0; line-height: 1.25; }
.mecard__t strong { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mecard__t span { font-size: 13px; color: var(--gold); }
@media (hover: hover) { .mecard:hover { background: #5a2fc0; } }
/* the community is the heart of the place: bold, framed in gold */
.nav a.nav__strong { font-weight: 800; color: #fff; background: rgba(255, 222, 89, .12); box-shadow: inset 0 0 0 1.5px rgba(255, 222, 89, .5); }
.nav a.nav__strong[aria-current="page"] { background: var(--gold); color: var(--gold-ink); }

/* the profile pages */
#view.is-profile .view__head .search { display: none; }
.me { display: grid; gap: 6px; padding-bottom: 30px; }
.me__head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 16px; padding: 14px; border: 2px solid #000; border-radius: var(--radius);
  background: var(--violet-3); box-shadow: var(--shadow); }
.me__pic { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 3px solid var(--gold); background: var(--violet-2); flex: none; }
.me__who { display: grid; gap: 4px; min-width: 0; flex: 1 1 180px; }
.me__nick { margin: 0; font: 900 28px/1.15 Heebo, sans-serif; color: var(--gold); text-shadow: 2px 2px 0 #000; overflow-wrap: anywhere; }
.me__title { margin: 0; display: flex; align-items: center; gap: 8px; font-weight: 800; color: #fff; }
.me__title img { width: 30px; height: 30px; object-fit: contain; }
.me__crowns, .me__next { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.me__bar { height: 10px; border: 1.5px solid #000; border-radius: 999px; background: rgba(255, 255, 255, .12); overflow: hidden; max-width: 260px; }
.me__bar span { display: block; height: 100%; background: var(--gold); }
.me__edit { flex: none; }
.me__sec { margin-top: 18px; }
.me__h { margin: 0 0 10px; font: 800 20px/1.2 Heebo, sans-serif; color: #fff; }
.me__empty { margin: 0; color: var(--ink-3); font-size: 14px; }
.me__links, .me__set { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.me__pending { display: grid; place-items: center; min-height: 120px; padding: 10px; border-style: dashed; color: var(--ink-3); font-size: 13px; text-align: center; }
.me__join { display: grid; justify-items: center; gap: 10px; padding: 18px 14px; border: 2px solid #000; border-radius: var(--radius); background: var(--violet-3);
  box-shadow: var(--shadow); text-align: center; }
.me__crown { width: 90px; height: auto; }
.me__fine { margin: 6px 0 0; font-size: 13px; color: var(--ink-3); text-align: center; }
.me__fine a { color: var(--ink-2); }
.join { text-align: center; }
.join__crown { width: 84px; height: auto; margin: 0 auto 4px; }
.join h2 { margin: 0 0 10px; }
.join__list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; text-align: start; }
.join__list li { display: flex; align-items: center; gap: 10px; color: var(--ink-2); line-height: 1.4; text-wrap: pretty; }
.join__list img { width: 40px; height: 40px; object-fit: contain; flex: none; }
.join__google { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 48px; margin: 4px 0 2px; }
.join .btn--ghost { margin-top: 10px; }
/* the profile editor */
.meedit__lead { margin: 0 0 12px; color: var(--ink-2); }
.meedit__hint { margin: 4px 0 10px; font-size: 12.5px; color: var(--ink-3); }
.meedit__pics { margin: 0; padding: 0; border: 0; }
.meedit__pics legend { padding: 0; margin-bottom: 6px; font-size: 13px; color: var(--ink-3); }
.meedit__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 8px; }
.meedit__pic { aspect-ratio: 1; padding: 3px; border: 2px solid transparent; border-radius: 50%; background: var(--violet-2); }
.meedit__pic img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.meedit__pic[aria-pressed="true"] { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 222, 89, .35); }
.meedit__up { margin-top: 10px; }
/* a member's community card: picture, name (to their page), title badge */
.ccard__who { display: flex; align-items: center; gap: 5px; min-width: 0; color: var(--ink-2); text-decoration: none; }
.ccard__who span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ccard__face { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; border: 1.5px solid #000; background: var(--violet-2); flex: none; }
.ccard__badge { width: 17px; height: 17px; object-fit: contain; flex: none; }
.sharedlg__as { margin: 0 0 10px; color: var(--ink-2); }
.sharedlg__as strong { color: var(--gold); }
#view.is-profile .view__title { display: none; }        /* the card says the name */
.btn--danger { background: transparent; border-color: #ff8a8a; color: #ffd2d2; box-shadow: none; }
@media (hover: hover) { .btn--danger:hover { background: rgba(255, 90, 90, .14); box-shadow: none; } }
.me__back { justify-self: start; margin-bottom: 8px; }   /* back to the party game */

/* stickers (16.11.2026): transparent Flow pictures to paste on a meme */
.stickers[open] { grid-template-rows: auto auto 1fr; }
.stickers__top { display: grid; gap: 10px; justify-items: center; padding: 12px 12px 4px; }
.stickers__top .search { margin: 0; }
.stickers__tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); width: min(560px, 100%); }
.stickers__tabs button { min-width: 0; padding: 4px 2px; font-size: 14px; }
.stickers__grid { overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; align-content: start; padding: 10px 12px 16px; }
.sticker { display: grid; gap: 4px; justify-items: center; padding: 8px 6px 6px; border: 2px solid #000; border-radius: var(--radius);
  background: rgba(255, 255, 255, .07); color: var(--ink-2); font-size: 12.5px; box-shadow: 2px 2px 0 #000; transition: transform var(--dur-fast) var(--ease-out); }
.sticker img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.sticker span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (hover: hover) { .sticker:hover { transform: translate(-1px, -1px); background: rgba(255, 255, 255, .13); } }
.sticker:active { transform: scale(var(--press)); }
.stickers__none { grid-column: 1 / -1; text-align: center; color: var(--ink-3); }

/* effects row (16.11.2026): דאנק + גרעון sliders, 0 = off */
.opt--fx { display: grid; gap: 6px; }

/* phone home, tighter (16.11.2026, Daniel: "make the homepage a little tighter so people start seeing the memes
   underneath ... without losing anything"): crown beside the title, smaller gaps and buttons, no drag/Ctrl+V hint on
   touch screens (neither works there), the feed starts right after the buttons */
@media (max-width: 760px) {
  .home { grid-template-columns: auto auto; justify-content: center; align-items: center; column-gap: 8px; padding-top: 2px; }
  .home > * { grid-column: 1 / -1; }
  .home > .home__crown { grid-column: 1; width: 60px; height: 60px; }
  .home > .home__title { grid-column: 2; margin: 0; font-size: 36px; text-shadow: 3px 3px 0 #000; }
  .home__sub { margin: 2px 0 10px; font-size: 15px; }
  .home .search__hints { margin-top: 8px; }
  .search__hints button { min-height: 32px; padding: 0 12px; }
  .home__actions { margin-top: 10px; gap: 10px; }
  .home__actions .btn { min-height: 46px; font-size: 16px; }
  .feed { margin-top: 18px; }
  .feed__head { margin-bottom: 10px; }
  .feed__title { font-size: 22px; }
  .nowcard { margin-top: 12px; }
}
@media (max-width: 760px) and (hover: none) { .home__hint { display: none; } }

/* pasted picture options (16.11.2026): label + size on one line, היפוך / שכפול / מחיקה in one even row below */
#overlayOpt:not([hidden]) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-items: center; }
#overlayOpt > span { grid-column: 1; min-width: 0; }
#overlayOpt > input[type="range"] { grid-column: 2 / -1; min-width: 0; }
#overlayOpt > .btn { min-width: 0; }

/* category links for people and search engines (tools/make_seo.py writes them into index.html) */
.homecats { margin: 28px 0 8px; }
.homecats__title { font: 800 18px/1.2 Heebo, sans-serif; color: var(--ink-2); margin: 0 0 10px; }
.homecats__list { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 15px; }
.homecats__list a { color: var(--ink-2); }
.editor__by { margin: 6px 0 0; text-align: center; font-size: 14px; color: var(--ink-2); }
.editor__by a { color: var(--gold); font-weight: 700; }
.me__more { margin-top: 10px; }
.me__acts { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 100%; }
#overlayOpt > #overlayRot { grid-column: 2 / -1; min-width: 0; }
#overlayOpt > span:nth-of-type(2) { grid-column: 1; }
.edflip { justify-self: stretch; width: 100%; margin-top: 8px; }


/* the people tab (16.11.2026): members as cards, 2 columns on wide screens */
.grid.is-people { columns: auto; display: block; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.person { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 2px solid #000; border-radius: var(--radius);
  background: var(--violet-3); box-shadow: 3px 3px 0 #000; color: #fff; text-decoration: none; transition: transform var(--dur-fast) var(--ease-out); }
@media (hover: hover) { .person:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 #000; } }
.person:active { transform: scale(var(--press)); }
.person__pic { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 3px solid var(--gold); background: var(--violet-2); flex: none; }
.person__body { display: grid; gap: 2px; min-width: 0; }
.person__nick { font: 900 19px/1.2 Heebo, sans-serif; color: var(--gold); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person__title { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; }
.person__title img { width: 22px; height: 22px; object-fit: contain; }
.person__stats { font-size: 13px; color: var(--ink-2); }
.person__place { position: absolute; inset-inline-end: 10px; top: 8px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%;
  background: var(--gold); color: var(--gold-ink); font-weight: 900; border: 2px solid #000; }
@media (max-width: 760px) { .ctabs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.examples__mine { margin: 0 0 10px; font-size: 16px; color: var(--gold); }
#examplesMine .examples__row { margin-bottom: 18px; }


/* suggest a template (16.11.2026) */
.suggest { max-width: 440px; }
.suggest h2 { margin: 0 0 6px; }
.suggest__lead { margin: 0 0 10px; color: var(--ink-2); font-size: 14.5px; }
.suggest__pic { display: block; max-width: 100%; max-height: 220px; margin: 0 auto 12px; border: 2px solid #000; border-radius: var(--radius); }
.suggest__name { display: grid; gap: 6px; font-weight: 700; margin-bottom: 10px; }
.suggest__name input { min-height: 44px; padding: 0 12px; border: 2px solid #000; border-radius: 6px; font: inherit; background: #fffdf5; color: #1b1035; }
.suggest__row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }

/* template managers on their profile (16.11.2026) */
.modgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.modcard { display: grid; gap: 6px; padding: 8px; border: 2px solid #000; border-radius: var(--radius); background: var(--violet-3); box-shadow: 3px 3px 0 #000; }
.modcard img { width: 100%; border-radius: 6px; background: var(--violet-2); min-height: 80px; object-fit: contain; }
.modcard input { min-height: 38px; padding: 0 8px; border: 2px solid #000; border-radius: 6px; font: inherit; background: #fffdf5; color: #1b1035; }
.modcard__by { margin: 0; font-size: 13px; color: var(--ink-2); }
.modcard__row { display: flex; gap: 6px; }


/* ===== community page, 16.11.2026 review (Daniel): readable on a phone, one footer, rank tag off the caption ===== */
/* feed: one wide column so the subtitles read without squinting; grid stays two columns */
.grid.is-feed { columns: 1; max-width: 560px; margin-inline: auto; }
.cview { gap: 6px; }
.cview__ic { width: 16px; height: 16px; display: inline-block; border: 2px solid currentColor; border-radius: 3px;
  background: linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat; }
#cviewBtn[data-v="grid"] .cview__ic { background: none; }
/* this week's #1: the full width, above the grid */
.grid:not(.is-feed) .ccard--r1:first-child { column-span: all; }
/* the rank tag: out of the reading corner (Hebrew starts top-right), half outside the card, medal colours */
.ccard { position: relative; overflow: visible; }
.ccard__pic { overflow: hidden; border-radius: calc(var(--radius) - 2px) calc(var(--radius) - 2px) 0 0; }
.ccard__rank { top: -10px !important; left: -10px; right: auto !important; inset-inline-start: auto !important; z-index: 2;
  width: 34px; height: 34px; border: 2px solid #000; box-shadow: 2px 2px 0 #000; }
.ccard--top .ccard__rank { position: absolute; }
.ccard--r1 { border-color: #ffd700; box-shadow: 0 0 0 2px #ffd700, var(--shadow); }
.ccard--r2 { border-color: #e2e8f0; box-shadow: 0 0 0 2px #e2e8f0, var(--shadow); }
.ccard--r3 { border-color: #f59e0b; box-shadow: 0 0 0 2px #f59e0b, var(--shadow); }
.ccard--r1 .ccard__rank { background: #ffd700; }
.ccard--r2 .ccard__rank { background: #e2e8f0; }
.ccard--r3 .ccard__rank { background: #f59e0b; }
/* the rank tag lives on the card, not inside the picture */
.ccard--top > .ccard__rank { position: absolute; }
/* one footer: face + name (right), the crown pill (left) */
.ccard__bar { min-height: 40px; padding: 6px 8px; gap: 8px; }
.ccard__who { display: flex; align-items: center; gap: 7px; min-width: 0; flex: 1; color: var(--ink-2); text-decoration: none; font-weight: 700; font-size: 13.5px; }
.ccard__facebox { position: relative; flex: none; width: 28px; height: 28px; }
.ccard__face { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 2px solid #000; background: var(--violet-2); display: block; }
.ccard__facebox .ccard__badge { position: absolute; bottom: -4px; inset-inline-start: -6px; width: 16px; height: 16px; object-fit: contain; filter: drop-shadow(1px 1px 0 #000); }
.ccard__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crownbtn--card { flex: none; min-height: 30px; padding: 2px 10px 2px 8px; gap: 5px; border: 2px solid #000; border-radius: 999px;
  background: rgba(255, 255, 255, .08); box-shadow: 0 2px 0 #000; font-weight: 800; color: #fff; }
.crownbtn--card img { width: 18px; height: 18px; }
.crownbtn--card[aria-pressed="true"] { background: var(--gold); color: var(--gold-ink); }
/* the header: smaller search, a quiet "סימון ממים", the note on its own clean line */
@media (max-width: 760px) {
  #view.is-community .view__head { gap: 8px; }
  #view.is-community .view__title { font-size: 24px; }
  #view.is-community .search--small input { min-height: 46px; height: 46px; padding-inline: 14px 50px; font-size: 16px; }
  #view.is-community .search--small .search__btn img { width: 26px; height: 26px; }
  #view.is-community .view__bar { flex-wrap: wrap; row-gap: 6px; }
  #view.is-community .view__bar .view__count { flex: 1 1 100%; order: -1; color: #e2d9f3; font-size: 13px; line-height: 1.4; }
}
.view__pick { background: transparent; box-shadow: none; border: 2px solid rgba(255, 255, 255, .45); }
.ctabs button[aria-selected="true"] { box-shadow: 0 3px 0 #000; }
/* tactile press: buttons and tabs drop 2 px and lose their shadow */
.btn, .ctabs button, .crownbtn--card, .tool { transition: transform 100ms ease, box-shadow 100ms ease; }
.btn:active, .ctabs button:active, .crownbtn--card:active { transform: translateY(2px); box-shadow: 0 0 0 #000; }
@media (prefers-reduced-motion: no-preference) {
  /* the crown: a short spring with a small tilt, the number hops */
  .crownbtn.is-pop img { animation: gm-crown-pop2 420ms cubic-bezier(.34, 1.56, .64, 1); }
  .crownbtn.is-pop .crownbtn__n { animation: gm-count-hop 360ms cubic-bezier(.22, 1, .36, 1); }
  /* cards come in one after another, 30 ms apart */
  .ccard--in { animation: gm-card-in 250ms cubic-bezier(.22, 1, .36, 1) both; animation-delay: calc(var(--i, 0) * 30ms); }
  /* the viewer opens with a soft zoom */
  .viewer[open] { animation: gm-zoom-in 220ms cubic-bezier(.22, 1, .36, 1); }
}
@keyframes gm-crown-pop2 { 0% { transform: scale(1); } 45% { transform: scale(1.3) rotate(-10deg); } 100% { transform: scale(1); } }
@keyframes gm-count-hop { 0% { transform: translateY(6px); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes gm-card-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes gm-zoom-in { from { opacity: 0; transform: scale(.95); } to { opacity: 1; transform: none; } }
/* the viewer: a blurred page behind it, a tap outside closes it */
.viewer::backdrop { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
/* review fixes (16.11.2026): the #1 hero needs a block box to span the columns; tighter footer in two columns;
   tabs fit one row; the view switch is a small icon at the end of the note line */
.grid:not(.is-feed) .ccard--r1:first-child { display: block; }
.grid:not(.is-feed) .ccard__bar { padding: 5px 6px; gap: 5px; }
.grid:not(.is-feed) .ccard__facebox, .grid:not(.is-feed) .ccard__face { width: 24px; height: 24px; }
.grid:not(.is-feed) .crownbtn--card { padding: 1px 7px; gap: 3px; min-height: 28px; }
.grid:not(.is-feed) .ccard__who { gap: 5px; font-size: 12.5px; }
@media (max-width: 760px) {
  .ctabs button { padding: 4px 6px; gap: 4px; font-size: 14px; min-width: 0; }
  .ctabs button img { width: 20px; height: 20px; }
  #view.is-community .view__bar { flex-wrap: nowrap; align-items: center; }
  #view.is-community .view__bar .view__count { flex: 1 1 auto; order: 0; }
}
.cview { min-width: 40px; min-height: 36px; padding: 2px 8px; }
.cview #cviewLabel { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 430px) { .ctabs button img { display: none; } .ctabs button { justify-content: center; font-size: 15px; } }
.ibtn--bold { font: 900 20px/1 Heebo, sans-serif; color: #fff; }
.ibtn--bold[aria-pressed="true"] { color: var(--gold-ink); }

/* three equal buttons on the home page (16.11.2026, Daniel: "everything the same size") */
.home__actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(560px, 100%); }
.home__actions .btn { min-width: 0; padding-inline: 8px; }
@media (max-width: 760px) { .home__actions { gap: 8px; } .home__actions .btn { font-size: 14.5px; gap: 6px; } .home__actions .btn img { width: 22px; height: 22px; } }
@media (max-width: 430px) { .home__actions .btn { flex-direction: column; gap: 2px; min-height: 58px; padding: 6px 4px; font-size: 14px; line-height: 1.15; } .home__actions .btn img { width: 24px; height: 24px; } }
.meedit__grid { max-height: min(46vh, 300px); overflow-y: auto; padding: 4px; overscroll-behavior: contain; }

/* delete your own meme on your profile (16.11.2026) */
.me__grid .ccard { position: relative; }
.ccard__del { position: absolute; top: 6px; left: 6px; z-index: 3; display: grid; place-items: center; width: 34px; height: 34px; padding: 0;
  border: 2px solid #000; border-radius: 50%; background: #fff; box-shadow: 2px 2px 0 #000; cursor: pointer;
  transition: transform 160ms cubic-bezier(.16,1,.3,1); }
.ccard__del img { width: 20px; height: 20px; }
.ccard__del::after { content: ""; position: absolute; inset: -6px; }
.ccard__del:hover { transform: scale(1.08); }
.ccard__del:active { transform: scale(.94); }
.ccard__del:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.me__pending .ccard__del { top: 6px; left: 6px; }

/* several pictures in one meme (16.11.2026) */
.imgmenu__head { flex-basis: 100%; margin: 6px 0 0; font-size: 13.5px; font-weight: 700; color: #d9d2ff; }
.seg--stack { flex-basis: 100%; display: grid; grid-template-columns: 1fr 1fr; }

/* stories (16.11.2026, Or): one card that looks like a small stack of pages */
.ccard--story { position: relative; }
.ccard--story::before, .ccard--story::after { content: ""; position: absolute; inset: 0; z-index: -1; border: 2px solid #000;
  border-radius: var(--radius); background: var(--violet-2); }
.ccard--story::before { transform: translate(-5px, 5px) rotate(-1.5deg); }
.ccard--story::after { transform: translate(-10px, 10px) rotate(-3deg); background: var(--violet-1, #2a1470); }
.ccard--story { margin-bottom: 22px; }
.story__badge { position: absolute; top: 8px; right: 8px; padding: 3px 10px; border: 2px solid #000; border-radius: 999px;
  background: var(--gold); color: var(--gold-ink, #1b0b45); font: 800 13px/1.3 Heebo, sans-serif; box-shadow: 2px 2px 0 #000; }
.story__title { margin: 0; padding: 8px 10px 0; font-size: 16px; font-weight: 800; line-height: 1.25; color: #fff; overflow-wrap: anywhere; }
.story__crowns { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border: 2px solid #000; border-radius: 999px;
  background: #1b0b45; color: #fff; font: 800 14px/1.2 Heebo, sans-serif; }
.story__crowns img { width: 18px; height: 18px; }
.story__edit { flex: none; }
.ccard--story.is-empty { padding: 10px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.ccard--story.is-empty .story__title { padding: 0; }
.me__newstory { margin: 0 0 8px; }
.me__note { margin: 0 0 12px; color: #cfc6f5; font-size: 14px; }
.sharedlg__story { display: grid; gap: 8px; }
.sharedlg__story select { width: 100%; min-height: 44px; padding: 8px 10px; border: 2px solid #000; border-radius: 10px; background: #fff;
  color: #1b0b45; font: 600 15px Heebo, sans-serif; }
.storyview { width: min(640px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0 auto; padding: 0;
  border: 0; background: var(--violet-1, #24105e); color: #fff; overflow-y: auto; overscroll-behavior: contain; }
.storyview::backdrop { background: rgba(10, 4, 30, .82); }
.storyview__top { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px; background: var(--violet-2, #2f1785); border-bottom: 2px solid #000; }
.storyview__head h2 { margin: 0; font-size: 20px; line-height: 1.2; }
.storyview__head p { margin: 2px 0 0; color: #d9d2ff; font-size: 14px; }
.storyview__head a { color: var(--gold); font-weight: 700; }
.storyview__x { flex: none; width: 44px; height: 44px; font-size: 20px; }
.storyview__list { list-style: none; margin: 0; padding: 16px; display: grid; gap: 18px; }
.storyview__item > img { display: block; width: 100%; height: auto; border: 2px solid #000; border-radius: var(--radius); background: #1b0b45; }
.storyview__row { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.storyview__n { color: #cfc6f5; font-weight: 800; }
.storyview__end { display: flex; gap: 10px; justify-content: center; padding: 6px 16px 28px; }
.storyedit { width: min(560px, calc(100vw - 24px)); }
.storyedit__h { margin: 14px 0 6px; font-size: 15px; }
.storyedit__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.storyedit__row { display: grid; grid-template-columns: 22px 64px 1fr auto auto; align-items: center; gap: 8px; }
.storyedit__row img { width: 64px; height: 48px; object-fit: cover; border: 2px solid #000; border-radius: 8px; }
.storyedit__row .iconbtn { width: 40px; height: 40px; }
.storyedit__row .btn { grid-column: 3; justify-self: start; }
.storyedit__n { font-weight: 800; text-align: center; }
.storyedit__pool { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; max-height: 260px; overflow-y: auto; }
.storyedit__add { position: relative; padding: 0; border: 2px solid #000; border-radius: 8px; background: #1b0b45; cursor: pointer; aspect-ratio: 1; overflow: hidden; }
.storyedit__add img { width: 100%; height: 100%; object-fit: cover; display: block; }
.storyedit__add:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.storyedit__tag { position: absolute; inset: auto 0 0; background: rgba(0,0,0,.7); font-size: 11px; text-align: center; color: #fff; }
.storyedit__empty { margin: 4px 0; color: #cfc6f5; font-size: 14px; }
.storyedit__del { margin-top: 12px; padding: 8px 0; border: 0; background: none; color: #ff9aa8; font: 700 14px Heebo, sans-serif; cursor: pointer; text-decoration: underline; }

/* community cards all the same size (16.11.2026, Daniel: "not suited to a computer at all ... I asked for no
   pictures of different sizes"): a real grid of even cells, each picture whole inside the same square box; on a computer
   several columns (the old #1 hero that spanned the whole width is gone); the feed is one even column */
#view.is-community #grid, .me__grid { columns: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; align-items: start; }
#view.is-community #grid.is-feed { grid-template-columns: minmax(0, 1fr); max-width: 520px; margin-inline: auto; }
#view.is-community #grid.is-people { display: block; }
#view.is-community #grid .ccard, .me__grid .ccard { margin: 0; }
#view.is-community #grid .ccard--r1:first-child { column-span: none; }
.ccard__pic { aspect-ratio: 1 / 1; display: grid; place-items: center; background: #160838; }
.ccard__pic img { width: 100%; height: 100%; object-fit: contain; }
.ccard--story::before { transform: translate(-4px, 4px) rotate(-1.2deg); }
.ccard--story::after { transform: translate(-8px, 8px) rotate(-2.4deg); }
@media (max-width: 760px) {
  #view.is-community #grid, .me__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; }
  #view.is-community #grid.is-feed { grid-template-columns: minmax(0, 1fr); gap: 14px; }
}

/* ===== profile + profile editor redesign (16.11.2026, Daniel: "richer, more fun, on the phone and on the computer") ===== */
.me { display: block; padding-bottom: 30px; }
.me__pre:empty, .me__top:empty { display: none; }
.me__body { margin-top: 4px; }
/* the hero: picture + title badge, name, numbers, the ladder of titles */
.me__hero { position: relative; overflow: hidden; display: grid; grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "pic who" "acts acts" "stats stats" "ladder ladder"; gap: 12px 14px; align-items: center; padding: 16px 14px 14px;
  border: 2px solid #000; border-radius: 12px; box-shadow: var(--shadow-lg);
  background: linear-gradient(140deg, #6233cf 0%, var(--violet-3) 44%, #33157f 100%); }
.me__hero::before { content: ""; position: absolute; top: -30px; inset-inline-end: -26px; width: 180px; height: 180px;
  background: url(ui/crown.png) center / contain no-repeat; opacity: .1; rotate: -14deg; pointer-events: none; }
.me__hero > * { position: relative; }
.me__avatar { grid-area: pic; position: relative; width: 92px; height: 92px; padding: 0; border: 0; border-radius: 50%; background: none; color: inherit; }
.me__avatar .me__pic { display: block; width: 100%; height: 100%; border: 4px solid var(--gold); box-shadow: 3px 3px 0 #000;
  transition: transform var(--dur-fast) var(--ease-out); }
.me__rankbadge { position: absolute; inset-inline-end: -8px; bottom: -6px; width: 40px; height: 40px; object-fit: contain;
  filter: drop-shadow(2px 2px 0 #000); pointer-events: none; }
.me__avhint { position: absolute; inset-inline: 0; bottom: 8px; width: max-content; margin-inline: auto; padding: 1px 9px; border: 2px solid #000;
  border-radius: 999px; background: var(--gold); color: var(--gold-ink); font-size: 12px; font-weight: 800; opacity: 0; transform: translateY(4px);
  transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); pointer-events: none; }
button.me__avatar { cursor: pointer; }
button.me__avatar:focus-visible { outline: none; box-shadow: var(--focus-ring); }
button.me__avatar:focus-visible .me__avhint { opacity: 1; transform: none; }
button.me__avatar:active .me__pic { transform: scale(.96); }
@media (hover: hover) {
  button.me__avatar:hover .me__pic { transform: scale(1.05) rotate(-3deg); }
  button.me__avatar:hover .me__avhint { opacity: 1; transform: none; }
}
.me__hero .me__who { grid-area: who; gap: 6px; }
.me__hero .me__nick { font-size: clamp(26px, 7.4vw, 42px); }
.me__hero .me__title { font-size: 15.5px; }
.me__hero .me__title span { padding: 2px 12px; border: 2px solid #000; border-radius: 999px; background: #1f0c52; color: var(--gold); box-shadow: 2px 2px 0 #000; }
.me__hero .me__acts { grid-area: acts; flex: none; }
.me__hero .me__acts .btn { flex: 1 1 0; justify-content: center; min-height: 40px; gap: 6px; }
.me__share img { width: 20px; height: 20px; }
.me__stats { grid-area: stats; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); gap: 8px; }
.me__stat { width: 100%; display: grid; justify-items: center; padding: 8px 4px 6px; border: 2px solid #000; border-radius: 10px;
  background: rgba(27, 11, 69, .74); color: #fff; box-shadow: 2px 2px 0 #000; font: inherit; }
button.me__stat { cursor: pointer; transition: transform var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out); }
button.me__stat:active { transform: translateY(1px); }
button.me__stat:focus-visible { outline: none; box-shadow: var(--focus-ring); }
@media (hover: hover) { button.me__stat:hover { transform: translateY(-2px); background: #2a1470; } }
.me__stat img { width: 26px; height: 26px; object-fit: contain; }
.me__statn { font: 900 24px/1.1 Heebo, sans-serif; color: var(--gold); font-variant-numeric: tabular-nums; }
.me__statl { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.ladder { grid-area: ladder; min-width: 0; padding-top: 12px; border-top: 2px dashed rgba(0, 0, 0, .35); }
.ladder__h { margin: 0 0 8px; font: 800 14px/1.2 Heebo, sans-serif; color: var(--ink-2); }
.ladder__wrap { position: relative; }
.ladder__track { position: absolute; top: 18px; inset-inline: calc(100% / 14); height: 8px; border: 1.5px solid #000; border-radius: 999px;
  background: rgba(255, 255, 255, .16); overflow: hidden; }
.ladder__fill { display: block; height: 100%; width: 0; background: var(--gold); transition: width var(--dur-slow) var(--ease-out); }
.ladder__steps { position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.ladder__steps li { display: grid; justify-items: center; align-content: start; gap: 2px; min-width: 0; }
.ladder__step { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.ladder__step img { width: 36px; height: 36px; object-fit: contain; filter: drop-shadow(1px 2px 0 #000); transition: transform var(--dur-fast) var(--ease-out); }
.ladder__steps .is-next img { filter: grayscale(1) brightness(.85) drop-shadow(1px 2px 0 #000); opacity: .5; }
.ladder__steps .is-now .ladder__step { background: radial-gradient(circle, rgba(255, 222, 89, .55) 0%, rgba(255, 222, 89, 0) 70%); }
.ladder__steps .is-now img { width: 44px; height: 44px; }
.ladder__step[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--gold); }
.ladder__step:focus-visible { outline: none; box-shadow: var(--focus-ring); }
@media (hover: hover) { .ladder__step:hover img { transform: scale(1.12) rotate(-6deg); } }
.ladder__name { display: none; }
.ladder__n { font: 800 11.5px/1 Heebo, sans-serif; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ladder__steps .is-done .ladder__n, .ladder__steps .is-now .ladder__n { color: var(--gold); }
.ladder__info { margin: 10px 0 0; min-height: 1.45em; font-size: 14.5px; font-weight: 700; color: #fff; text-align: center; }
/* sections: icons in the headings; the side column holds the hit, downloads, crowned, settings */
.me__h { display: flex; align-items: center; gap: 8px; }
.me__h img { width: 26px; height: 26px; object-fit: contain; flex: none; }
.me__sec { scroll-margin-top: 84px; }
.me__cols { display: grid; gap: 0 28px; }
.me__main, .me__side { min-width: 0; }
.me__side .me__sec { padding: 12px; border: 2px solid #000; border-radius: 10px; background: rgba(44, 18, 104, .8); box-shadow: var(--shadow); }
.me__side .me__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.me__side .me__grid .tile { margin: 0; }
.me__hit .ccard { display: block; width: 100%; max-width: 360px; margin: 0; }
.me__emptybox { display: grid; justify-items: start; gap: 10px; padding: 14px; border: 2px dashed var(--ink-3); border-radius: 10px; }
.me__faces { display: flex; justify-content: center; }
.me__faces img { width: 44px; height: 44px; margin-inline-start: -8px; border: 2px solid #000; border-radius: 50%; background: var(--violet-2); object-fit: cover; }
.me__faces img:first-child { margin-inline-start: 0; }
.me__facesnote { margin: 0; font-size: 13.5px; color: var(--ink-2); text-align: center; }
@media (min-width: 900px) {
  .me__hero { grid-template-columns: auto minmax(0, 1fr) minmax(300px, 440px); grid-template-areas: "pic who stats" "pic acts stats" "ladder ladder ladder";
    gap: 10px 26px; padding: 24px 28px 18px; }
  .me__avatar { width: 128px; height: 128px; }
  .me__rankbadge { width: 54px; height: 54px; inset-inline-end: -12px; bottom: -8px; }
  .me__hero .me__who { align-self: end; }
  .me__hero .me__acts { align-self: start; }
  .me__hero .me__acts .btn { flex: none; }
  .me__hero .me__title { font-size: 17px; }
  .me__stat { padding: 12px 6px 10px; }
  .me__stat img { width: 32px; height: 32px; }
  .me__statn { font-size: 30px; }
  .me__statl { font-size: 13.5px; }
  .ladder { padding-top: 14px; }
  .ladder__track { top: 23px; height: 10px; }
  .ladder__step { width: 56px; height: 56px; }
  .ladder__step img { width: 46px; height: 46px; }
  .ladder__steps .is-now img { width: 56px; height: 56px; }
  .ladder__name { display: block; font: 800 13.5px/1.2 Heebo, sans-serif; color: #fff; text-align: center; }
  .ladder__steps .is-next .ladder__name { color: var(--ink-3); }
  .ladder__n { font-size: 12.5px; }
  .ladder__n::after { content: " כתרים"; font-weight: 700; }
}
@media (min-width: 1100px) { .me__cols:not(.is-single) { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; } }
/* the editor: preview + name on one side, the pictures on the other; on a phone they stack and the pictures scroll */
.meedit { width: min(460px, calc(100vw - 16px)); max-height: calc(100dvh - 16px); padding: 0; }
.meedit[open] { display: flex; flex-direction: column; }
.meedit__top { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px 8px; }
.meedit__top h2 { margin: 0; font-size: 22px; }
.meedit__lead { flex: none; margin: 0; padding: 0 16px 8px; }
.meedit__body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 10px; padding: 0 16px; }
.meedit__me { flex: none; display: grid; gap: 8px; min-width: 0; }
.meedit__preview { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 2px solid #000; border-radius: 12px;
  background: linear-gradient(140deg, #6233cf 0%, var(--violet-3) 55%, #33157f 100%); box-shadow: var(--shadow); }
.meedit__face { position: relative; flex: none; display: block; width: 68px; height: 68px; }
.meedit__face > img:first-child { display: block; width: 100%; height: 100%; border: 3px solid var(--gold); border-radius: 50%; background: var(--violet-2);
  object-fit: cover; box-shadow: 2px 2px 0 #000; }
.meedit__rank { position: absolute; inset-inline-end: -6px; bottom: -6px; width: 30px; height: 30px; object-fit: contain; filter: drop-shadow(1px 2px 0 #000); }
.meedit__pv { display: grid; min-width: 0; line-height: 1.25; }
.meedit__pv strong { font: 900 22px/1.15 Heebo, sans-serif; color: var(--gold); text-shadow: 2px 2px 0 #000; overflow-wrap: anywhere; }
.meedit__pv strong.is-empty { color: var(--ink-2); font-weight: 700; text-shadow: none; }
.meedit__pv span { font-size: 14px; font-weight: 800; }
.meedit__pv small { font-size: 12px; color: var(--ink-2); }
.meedit__nick > span { display: flex; justify-content: space-between; align-items: baseline; }
.meedit__nick small { font-variant-numeric: tabular-nums; }
.meedit__nick input { height: 44px; font-size: 16px; }
.meedit__hint { margin: 0; min-height: 1.45em; }
.meedit__hint.is-bad { color: #ffd0d0; font-weight: 700; }
.meedit__quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.meedit__quick .btn { justify-content: center; gap: 6px; min-height: 40px; margin: 0; padding-inline: 6px; }
.meedit__quick .btn img { width: 20px; height: 20px; }
.meedit__pics { flex: 1 1 auto; min-height: 0; min-width: 0; display: flex; flex-direction: column; }
.meedit__tabs { flex: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.meedit__tab { min-height: 36px; padding: 2px 10px; border: 2px solid #000; border-radius: 999px; background: var(--violet-3); color: #fff;
  font: 700 13.5px/1.2 Heebo, sans-serif; cursor: pointer; }
.meedit__tab[aria-pressed="true"] { background: var(--gold); color: var(--gold-ink); }
.meedit__tab:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.meedit__grid { flex: 1 1 auto; min-height: 132px; max-height: none; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); align-content: start; gap: 8px;
  padding: 8px; border: 2px solid #000; border-radius: 10px; background: rgba(27, 11, 69, .62); }
.meedit__pic { cursor: pointer; transition: transform var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out); }
.meedit__pic:active { transform: scale(.94); }
.meedit__pic:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.meedit__pic[aria-pressed="true"] { transform: scale(1.06); background: #5a2fc0; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 222, 89, .45); }
@media (hover: hover) { .meedit__pic:not([aria-pressed="true"]):hover { transform: scale(1.1) rotate(-4deg); } }
.meedit .adsheet__err { flex: none; padding: 6px 16px 0; }
.meedit__actions { flex: none; padding: 10px 16px 14px; }
@media (min-width: 760px) {
  .meedit { width: min(860px, calc(100vw - 48px)); }
  .meedit__top { padding: 16px 22px 10px; }
  .meedit__top h2 { font-size: 26px; }
  .meedit__lead { padding: 0 22px 10px; }
  .meedit__body { flex-direction: row; align-items: stretch; gap: 22px; padding: 0 22px; }
  .meedit__me { flex: 0 0 272px; align-content: start; gap: 10px; }
  .meedit__preview { flex-direction: column; padding: 18px 12px 14px; text-align: center; }
  .meedit__face { width: 124px; height: 124px; }
  .meedit__rank { width: 46px; height: 46px; inset-inline-end: -10px; }
  .meedit__pv { justify-items: center; }
  .meedit__pv strong { font-size: 26px; }
  .meedit__grid { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 10px; padding: 10px; max-height: 400px; }
  .meedit .adsheet__err { padding: 6px 22px 0; }
  .meedit__actions { padding: 14px 22px 18px; }
  .meedit__actions .btn { flex: 0 0 170px; }
}
@keyframes me-swap { from { scale: .78; rotate: -9deg; } to { scale: 1; rotate: 0deg; } }
@media (prefers-reduced-motion: no-preference) {
  .me__hero.is-intro .me__avatar { animation: gm-pop var(--dur-medium) var(--ease-pop) both; }
  .me__hero.is-intro .me__who, .me__hero.is-intro .me__acts { --from: 8px; animation: gm-rise var(--dur-medium) var(--ease-out) 60ms both; }
  .me__hero.is-intro .me__stats li { --from: 10px; animation: gm-rise var(--dur-medium) var(--ease-out) both; animation-delay: calc(120ms + var(--i, 0) * 45ms); }
  .me__hero.is-intro .ladder__steps li { animation: gm-pop var(--dur-base) var(--ease-pop) both; animation-delay: calc(200ms + var(--i, 0) * 40ms); }
  .me__faces img { animation: gm-pop var(--dur-base) var(--ease-pop) both; animation-delay: calc(var(--i, 0) * 50ms); }
  .meedit__face.is-pop { animation: me-swap var(--dur-base) var(--ease-pop); }
  .meedit__roll.is-spin img { animation: gm-spin 520ms var(--ease-out); }
}
@media (prefers-reduced-motion: reduce) { .ladder__fill { transition: none; } }
/* the editor on small phones (and with the keyboard up): nothing overlaps; if it cannot all fit, the middle scrolls */
.meedit__body { overflow-y: auto; overscroll-behavior: contain; padding-block: 2px; }
.meedit__pics { min-height: 186px; }
@media (max-width: 400px) { .meedit__tabs { gap: 5px; } .meedit__tab { padding: 2px 8px; font-size: 13px; } }
@media (max-width: 759px) and (max-height: 720px) {
  .meedit__top { padding-bottom: 4px; }
  .meedit__lead { font-size: 14px; line-height: 1.35; }
  .meedit__preview { padding: 6px 10px; }
  .meedit__face { width: 52px; height: 52px; }
  .meedit__rank { width: 24px; height: 24px; }
  .meedit__pv strong { font-size: 19px; }
  .meedit__pv small { display: none; }
  .meedit__hint { font-size: 12px; }
}
@media (min-width: 760px) { .meedit__pics { min-height: 0; } }

/* ===== the title graphic (17.11.2026, Daniel's new Flow title "גברמלך הממים": gold word with a crown on the mem, white
   word with a laughing face). It replaces the text title in the phone top bar, the side menu and the home page.
   The final kaf hangs far below the line (27% of the box), so the picture is sized by its box and the leg is left to
   hang; ui/title.webp (1120 px) for the home page, ui/title-sm.webp (520 px) for the bars, both written by
   tools/make_title.py (it also makes the white word 15% bigger, his ask the same day). ===== */
.titlepic { display: block; height: auto; max-width: 100%; }
.sidebar__brand { display: block; padding: 2px 6px 10px; }
.sidebar__brand .titlepic { width: 100%; transition: transform var(--dur-fast) var(--ease-out); }
@media (hover: hover) { .sidebar__brand:hover .titlepic { transform: scale(1.03) rotate(-1deg); } }
.home__title { margin: 4px 0 0; font-size: 0; line-height: 0; text-shadow: none; }
.home__title .titlepic { width: min(600px, 88vw); margin-inline: auto; }
@media (max-width: 820px) {
  .topbar { padding-top: max(3px, env(safe-area-inset-top)); padding-bottom: 3px; min-height: 62px; }
  .topbar__home { flex: 0 1 auto; min-width: 0; }
  .topbar__home .titlepic { width: auto; height: 54px; max-height: 54px; object-fit: contain; }
}
@media (max-width: 760px) {
  .home > .home__title { font-size: 0; text-shadow: none; }
  .home > .home__title .titlepic { width: min(268px, 66vw); }
}

/* ===== the editor, 17.11.2026 (Daniel's screenshots: the download button cut off with a sideways scroll bar on a computer;
   seven squeezed tools and split export actions on a phone) =====
   Cause of the cut: the text tools row could not wrap and, with the bold button, was wider than the 400 px panel. */
.editor { overflow-x: hidden; }
.panel, #mainControls, .texts, .tbox, .tbox__icons, .stagewrap { min-width: 0; }
#mainControls { display: grid; gap: 10px; }
.edbar { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tbox__icons { flex-wrap: wrap; justify-content: flex-start; gap: 6px 10px; }
.tgrp { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.tbreak { display: none; }
.tbox__del { margin-inline-start: auto; }
/* undo / redo: readable on the dark bar, and apart from "ניהול" */
.editor__undo { align-items: center; gap: 4px; }
.editor__undo #undoBtn, .editor__undo #redoBtn { width: 40px; height: 40px; border: 2px solid #000; background: var(--violet-3); box-shadow: 2px 2px 0 #000; }
.editor__undo #undoBtn:disabled, .editor__undo #redoBtn:disabled { opacity: .55; box-shadow: none; background: rgba(255, 255, 255, .1); }
.editor__admin { margin-inline-end: 14px; position: relative; }
.editor__admin::after { content: ""; position: absolute; inset-inline-end: -9px; top: 4px; bottom: 4px; width: 2px; background: rgba(255, 255, 255, .25); }
/* the hint sits under the picture, as a quiet note; the picture starts level with the tools */
.stage__hint { justify-self: start; padding: 4px 10px; border-radius: 999px; background: rgba(27, 11, 69, .6); font-size: 13px; color: var(--ink-2); }
/* the finishing area */
.edfin { display: grid; gap: 8px; padding-top: 12px; border-top: 2px dashed rgba(0, 0, 0, .4); }
.edfin[hidden] { display: none; }
.edfin__main { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
/* WhatsApp green, readable white text (30.11.2026) */
.edfin .tool--wa { background: #1f8f4e; color: #fff; }
@media (hover: hover) { .edfin .tool--wa:hover { background: #23a35a; } }
.edfin .tool { grid-auto-flow: column; justify-content: center; align-items: center; gap: 8px; min-height: 52px; font-size: 16px; font-weight: 800; }
.edfin .tool[hidden] { display: none; }
.edfin__main .tool--gold { font-size: 18px; }
.edfin__sub { display: flex; flex-wrap: wrap; gap: 8px; }
.edfin__sub:not(:has(.tool:not([hidden]))) { display: none; }
.edfin__sub .tool { flex: 1 1 0; min-height: 40px; padding: 4px 10px; font-size: 14px; font-weight: 700; background: transparent; border-color: var(--ink-3); box-shadow: none; white-space: nowrap; }
.edfin__sub .tool img { width: 20px; height: 20px; }
/* the footer: who gave the template, and the removal request, readable */
.editor__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 20px; padding: 10px 20px 14px; border-top: 2px solid rgba(0, 0, 0, .35); }
.editor__foot:not(:has(p:not([hidden]))) { display: none; }
.editor__foot .editor__by, .editor__foot .editor__report { margin: 0; padding: 0; }
.editor__report a { color: var(--ink-2); text-decoration: underline; }
@media (hover: hover) { .editor__report a:hover { color: #fff; } }
/* ----- phone: full screen, the picture stuck on top, the finishing bar stuck at the bottom, roomy touch targets ----- */
@media (max-width: 820px) {
  .editor { box-shadow: none; outline: 0; padding-top: env(safe-area-inset-top); }
  .stagewrap { position: sticky; top: 56px; z-index: 2; margin-inline: -10px; padding: 4px 10px 6px; background: var(--violet); box-shadow: 0 6px 8px -6px rgba(0, 0, 0, .7); }
  .tool { font-size: 12.5px; }
  .edbar .tool { padding-inline: 1px; }
  .tbox__icons { gap: 8px 10px; }
  .tgrp { gap: 5px; }
  .tbreak { display: block; flex-basis: 100%; height: 0; }
  .ibtn { width: 38px; height: 38px; }
  .ibtn--swatch { width: 28px; }
  .editor__admin { min-height: 36px; padding: 2px 8px; font-size: 13px; margin-inline-end: 10px; }
  .editor__admin::after { inset-inline-end: -7px; }
  .edfin { position: sticky; bottom: 0; z-index: 4; gap: 6px; margin-top: 8px; padding: 8px 10px max(8px, env(safe-area-inset-bottom)); border-top: 2px solid #000;
    background: var(--violet-2); box-shadow: 0 -6px 10px -6px rgba(0, 0, 0, .7); }
  .edfin .tool { min-height: 48px; font-size: 15px; gap: 6px; }
  .edfin__main .tool--gold { font-size: 16px; }
  .edfin__sub .tool { min-height: 38px; font-size: 13.5px; }
  .editor__foot { padding: 8px 12px 10px; }
  /* similar memes: one row that slides sideways, so it does not push the page down */
  .similar__row { display: flex; flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; gap: 10px; padding-bottom: 6px; scrollbar-width: thin; }
  .similar__row > * { flex: 0 0 31%; scroll-snap-align: start; margin: 0; }
}

/* ===== home page + categories, 17.11.2026 (Daniel's UX brief: two clear goals, related actions together, categories as
   pictures in a hierarchy, nothing new for its own sake) ===== */
/* the opening: search = find a meme; under it "or a new meme from your own picture" with the two ways together;
   sending a template to the site is a quiet line */
.home__create { display: grid; justify-items: center; gap: 0; width: min(560px, 100%); margin-top: 18px; }
.home__createh { margin: 0 0 8px; font: 800 15px/1.2 Heebo, sans-serif; color: var(--ink-2); display: flex; align-items: center; gap: 10px; width: 100%; }
.home__createh::before, .home__createh::after { content: ""; flex: 1; height: 2px; background: rgba(255, 255, 255, .16); }
.home__create .home__actions { margin-top: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); width: min(420px, 100%); }
.home__create .home__hint { margin-top: 8px; }
.home__send { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; margin-top: 6px; padding: 4px 10px; border-radius: 999px; color: var(--ink-2);
  font-size: 14px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.home__send img { width: 20px; height: 20px; object-fit: contain; }
.home__send:focus-within { box-shadow: var(--focus-ring); }
@media (hover: hover) { .home__send:hover { color: #fff; background: rgba(255, 255, 255, .08); } }
@media (max-width: 430px) { .home__create .home__actions .btn { flex-direction: row; gap: 6px; min-height: 48px; font-size: 15px; } }
@media (max-width: 760px) { .home__create { margin-top: 10px; } .home__createh { font-size: 14px; margin-bottom: 6px; } .home__send { margin-top: 2px; font-size: 13.5px; } }
/* the feed bar: what is shown (all / ready) on one side, the shuffle on the other, the note under them */
.feed__head { grid-template-columns: minmax(0, 1fr) auto; }
.feed__head .feed__title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.feed__kind { grid-column: 1; grid-row: 1; justify-self: start; }
.feed__kind button { min-height: 40px; padding: 4px 16px; font-size: 16px; font-weight: 800; }
.feed__kind[hidden] + .feed__note { grid-row: 1; }
@media (max-width: 760px) { .feed__kind button { padding: 4px 12px; font-size: 15px; } }
/* categories as pictures */
.cats { margin: 0 0 22px; }
.cats__h { margin: 0 0 10px; font: 900 22px/1.1 Heebo, sans-serif; color: var(--ink-2); }
.cats__row { display: flex; flex-wrap: wrap; gap: 14px 10px; }
.catb { position: relative; display: grid; justify-items: center; align-content: start; gap: 3px; width: 92px; padding: 2px 0; border: 0; background: none; color: var(--ink);
  text-decoration: none; font: inherit; cursor: pointer; border-radius: 10px; }
.catb__pic { position: relative; display: block; width: 72px; height: 72px; }
.catb__pic img { display: block; width: 100%; height: 100%; border: 3px solid #000; border-radius: 50%; object-fit: cover; background: var(--violet-2); box-shadow: 3px 3px 0 #000;
  transition: transform var(--dur-fast) var(--ease-out); }
.catb__pic img.is-icon { object-fit: contain; padding: 14px; background: var(--violet-3); }
.catb__t { font-size: 13px; font-weight: 700; line-height: 1.2; text-align: center; text-wrap: balance; overflow-wrap: anywhere; }
.catb__n { font-size: 11.5px; font-weight: 700; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.catb:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.catb:active .catb__pic img { transform: scale(.94); }
@media (hover: hover) { .catb:hover .catb__pic img { transform: scale(1.07) rotate(-3deg); } .catb:hover .catb__t { color: var(--gold); } }
.newtag { position: absolute; top: -4px; inset-inline-start: -6px; padding: 0 6px; border: 2px solid #000; border-radius: 999px; background: var(--gold); color: var(--gold-ink);
  font: 800 11px/1.5 Heebo, sans-serif; box-shadow: 1px 1px 0 #000; }
.newtag--in { position: static; flex: none; box-shadow: none; }
.cats__hot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.cats__hotlab { font-size: 13.5px; font-weight: 800; color: var(--ink-2); flex: none; }
.hotc { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 2px 10px 2px 12px; border: 2px solid #000; border-radius: 999px; background: var(--violet-3);
  color: #fff; font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap; flex: none; }
.hotc img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; border: 1.5px solid #000; margin-inline-start: -8px; }
.hotc img.is-icon { object-fit: contain; }
.hotc small { color: var(--ink-3); font-weight: 700; font-size: 12px; }
.hotc:focus-visible { outline: none; box-shadow: var(--focus-ring); }
@media (hover: hover) { .hotc:hover { background: #5a2fc0; } }
@media (min-width: 821px) { .catb--all { display: none; } }
@media (max-width: 820px) {
  .cats { margin-bottom: 14px; }
  .cats__h { font-size: 18px; margin-bottom: 8px; }
  /* one row each that slides sideways (on purpose); it bleeds to the screen edges so the cut-off picture hints at more */
  .cats__row, .cats__hot { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none;
    margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; }
  .cats__row::-webkit-scrollbar, .cats__hot::-webkit-scrollbar { display: none; }
  .cats__row { gap: 6px; padding-block: 6px 4px; }
  .catb { flex: 0 0 76px; width: 76px; scroll-snap-align: start; }
  .catb__pic { width: 60px; height: 60px; }
  .catb__t { font-size: 12px; }
  .cats__hot { margin-top: 6px; padding-block: 2px 4px; }
  .hotc { scroll-snap-align: start; }
}
/* the side menu: filter, accordion, the "new" tag */
.nav__filter { width: 100%; height: 40px; margin: 2px 0 6px; padding: 0 12px; border: 2px solid #000; border-radius: var(--radius); background: var(--paper); color: #1a0d40; font: 500 15px Heebo, sans-serif; }
.nav__filter::placeholder { color: #6b5b95; }
.nav__filter:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.nav__none { margin: 4px 12px; font-size: 14px; color: var(--ink-3); }
.nav__cat { display: grid; gap: 2px; min-width: 0; }
.nav__row { display: flex; align-items: center; gap: 2px; min-width: 0; }
.nav__row > a { flex: 1 1 auto; min-width: 0; }
.nav__row > a > span:not(.nav__n):not(.newtag):not(.nav__icon) { min-width: 0; overflow-wrap: anywhere; }
.nav__tog { flex: none; width: 40px; height: 44px; padding: 0; border: 0; border-radius: var(--radius); background: none; color: var(--ink-2); font-size: 18px; line-height: 1; cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out); }
.nav__tog[aria-expanded="true"] { transform: rotate(180deg); color: var(--gold); }
.nav__tog:focus-visible { outline: none; box-shadow: var(--focus-ring); }
@media (hover: hover) { .nav__tog:hover { background: rgba(255, 255, 255, .1); color: #fff; } }
.nav__kids { display: grid; gap: 2px; }
.nav__kids[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) { .nav__kids:not([hidden]) { animation: gm-rise var(--dur-base) var(--ease-out) both; --from: -6px; } }
.nav a[aria-current="page"] .newtag { border-color: var(--gold-ink); }
.feed__head:has(.feed__kind[hidden]) .feed__title { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }

/* fixes after the first look (17.11.2026): the number sits on the picture, names keep to two lines, the menu names wrap by words */
.nav__row > a > span:not(.nav__n):not(.newtag):not(.nav__icon) { overflow-wrap: normal; }
.catb__n { position: absolute; bottom: -5px; inset-inline-end: -4px; min-width: 24px; padding: 0 5px; border: 2px solid #000; border-radius: 999px; background: #1b0b45; color: #fff;
  font: 800 11px/1.5 Heebo, sans-serif; text-align: center; }
.catb__t { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin-top: 3px; }
.cats__hotlab { scroll-snap-align: start; }
.feed__head .shufflebtn { grid-row: 1; }
.feed__note { grid-column: 1 / -1; }
@media (min-width: 821px) { .home { padding-top: clamp(16px, 4vh, 48px); } }
.feed { margin-top: 36px; }
@media (max-width: 820px) {
  .cats__h { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .cats__hot { scroll-snap-type: none; }
  .feed { margin-top: 18px; }
}
@media (max-width: 820px) {
  .feed__head { gap: 0 10px; margin-bottom: 8px; }
  .feed__note { min-height: 0; padding-top: 4px; font-size: 13px; }
  .cats { margin-bottom: 10px; }
  .cats__row { padding-block: 4px 2px; }
}
/* the folded list of every category at the bottom of the home page (plain links, mainly for search engines) */
.homecats { margin: 28px 0 8px; border: 2px solid rgba(0, 0, 0, .35); border-radius: 10px; background: rgba(44, 18, 104, .5); }
.homecats > summary { margin: 0; padding: 10px 14px; cursor: pointer; font: 800 15px/1.2 Heebo, sans-serif; color: var(--ink-2); list-style: none; display: flex; justify-content: space-between; }
.homecats > summary::-webkit-details-marker { display: none; }
.homecats > summary::after { content: "▾"; transition: transform var(--dur-fast) var(--ease-out); }
.homecats[open] > summary::after { transform: rotate(180deg); }
.homecats__list { display: block; padding: 0 14px 10px; font-size: 14.5px; }
.homecats__list p { margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.homecats__list a { color: var(--ink-2); }
.homecats__list a.homecats__top { color: #fff; font-weight: 800; }

/* one title at a time: the top bar's title hides while the home page's big title is on screen */
.topbar__home { transition: opacity var(--dur-base) var(--ease-out); }
html.is-hero .topbar__home { opacity: 0; pointer-events: none; }

/* the feed's title is visible again (the all / ready switch was taken out, 17.11.2026) */
.feed__head .feed__title { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; grid-column: 1; grid-row: 1; }

/* the template flies from its tile into the editor and back (18.11.2026): editor.js morphIn / land / morphOut */
.ed-ghost { position: fixed; inset: auto; margin: 0; padding: 0; border: 0; background: none; overflow: visible; pointer-events: none;
  transform-origin: 0 0; border-radius: 6px; box-shadow: 0 18px 40px rgba(0, 0, 0, .45); }
.ed-ghost::backdrop { display: none; }
.ed-ghost img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.editor.is-morph, .editor.is-morph[open] { transform: none; }
@starting-style { dialog.editor.is-morph[open] { transform: none; } }
.editor.is-ghosting #canvas { opacity: 0; }

/* tiles below the fold rise in as they scroll into view, a few at a time (18.11.2026): app.js reveal() */
@media (prefers-reduced-motion: no-preference) {
  /* doubled class: beats the home intro's `.feed.is-intro .tile` animation, which would otherwise show them at once */
  .tile.is-wait.is-wait.is-wait { opacity: 0; translate: 0 22px; animation: none; }
  .tile.is-up.is-up.is-up { animation: none; }   /* risen once: the home intro animation never replays on it (22.11.2026) */
  .tile.is-rise.is-rise.is-rise { animation: gm-rise 520ms var(--ease-out) both; animation-delay: calc(var(--j, 0) * 55ms); --from: 22px; }
}

/* the docked search (19.11.2026): app.js syncDock. Slides in from under the top when the page's own bar leaves the screen */
.dock { position: fixed; z-index: 14; top: var(--topbar-h, 0px); inset-inline-start: var(--side); inset-inline-end: 0;
  display: flex; justify-content: center; padding: 10px 16px; background: var(--violet-2); border-bottom: 2px solid #000; pointer-events: none; visibility: hidden; opacity: 0; translate: 0 -12px;
  transition: opacity var(--dur-fast, 160ms) var(--ease-in), translate var(--dur-fast, 160ms) var(--ease-in), visibility 0s linear var(--dur-fast, 160ms); }
html.is-docked .dock { visibility: visible; opacity: 1; translate: 0 0;
  transition: opacity var(--dur-base) var(--ease-out), translate var(--dur-base) var(--ease-out), visibility 0s; }
.dock { pointer-events: none; } html.is-docked .dock { pointer-events: auto; }
.dock .search { width: min(440px, 100%); }
.dock .search input { height: 46px; box-shadow: 3px 3px 0 #000; }
@media (max-width: 820px) {
  .dock { top: var(--topbar-h, 62px); padding: 8px 16px; }
  .dock .search { width: 100%; }
  .dock .search input { height: 44px; font-size: 16px; box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) { .dock, html.is-docked .dock { translate: none; transition: opacity 1ms, visibility 0s; } }

/* "רעיון לטקסט" (19.11.2026): editor.js ideaChip / applyIdea, the first chip of the text row */
.chip--idea { display: inline-flex; align-items: center; gap: 6px; background: var(--gold); color: var(--gold-ink, #2b1a00); font-weight: 800; border-color: #000; }
.chip--idea img { width: 18px; height: 18px; }
@media (prefers-reduced-motion: no-preference) { .chip--idea:active { transform: translateY(1px) scale(.97); } }

/* text links inside windows (19.11.2026, Daniel: "you can't read what it says in purple"): the browser's default
   blue / visited purple vanished on the violet window; gold with an underline, the same before and after a visit */
dialog a:not([class]), dialog a:not([class]):visited { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; font-weight: 700; }
dialog a:not([class]):hover { color: #fff; }
dialog a:not([class]):focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 3px; }

/* the random page is a masonry (22.11.2026): column divs filled shortest-first, so more memes never leave holes */
.grid.is-masonry { columns: auto; display: flex; align-items: flex-start; gap: var(--mgap, 14px); }
.grid.is-masonry > .mcol { flex: 1 1 0; min-width: 0; }
.more__sentinel { height: 1px; }
.more__end { text-align: center; color: var(--ink-3); font-size: 15px; margin: 18px 0 8px; }

/* ===== the editor on a computer: one screen, no scrolling (25.11.2026, Daniel: "מהמחשב הכל יהיה בלי צורך לגלול למטה";
   the brief is research/editor-desk-noscroll-prompt.md, the check tests/shot_editor_desk.py). The dialog is a fixed frame:
   bar / work area / a thin strip of similar memes. The picture is sized from the room its box really has (editor.js
   layout), the tools column keeps the finishing block at its foot, the similar memes slide sideways in the strip. ===== */
@media (min-width: 821px) {
  .editor[open] { display: grid; width: min(1560px, calc(100vw - 24px)); height: calc(100dvh - 24px); max-height: calc(100dvh - 24px);
    overflow: hidden; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; grid-template-rows: auto minmax(0, 1fr) auto; }
  .editor > .editor__bar, .editor > .editor__body { grid-column: 1 / -1; }
  .editor__bar { padding: 6px 12px; }
  .editor__body { grid-template-columns: minmax(0, 1fr) clamp(384px, 30vw, 400px); gap: 16px; padding: 12px 16px; align-items: stretch; min-height: 0; }
  .stagewrap { grid-template-rows: minmax(0, 1fr) auto; gap: 6px; min-height: 0; }
  .stage { min-height: 0; padding: 10px; overflow: hidden; }
  .stage canvas { max-height: none; }
  .stage__hint { padding: 3px 10px; font-size: 12.5px; }
  .panel { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  #mainControls { display: flex; flex-direction: column; gap: 8px; flex: 1 0 auto; }
  .edbar .tool { min-height: 56px; padding: 5px 2px; }
  .edbar .tool img { width: 26px; height: 26px; }
  .tbox textarea { min-height: 42px; max-height: 78px; padding: 6px 10px; }
  .edflip { margin-top: 0; min-height: 32px; font-size: 13px; }
  /* the text chips stay one row that slides sideways (3-4 texts used to add a second row) */
  .tchips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 1px; }
  .tchips::-webkit-scrollbar { display: none; }
  .tchips .chip { flex: none; max-width: 11em; }
  /* the text's tools on ONE row with the delete at its end (it used to take a row of its own) */
  .tbox__icons { flex-wrap: wrap; justify-content: flex-start; gap: 4px 5px; }
  .tgrp { gap: 2px; }
  .tbox .ibtn { width: 32px; height: 32px; }
  .tbox .ibtn img { width: 22px; height: 22px; }
  .tbox .ibtn--swatch { width: 24px; }
  .tbox__del { margin-inline-start: auto; }
  .seg--band button { white-space: nowrap; font-size: 12.5px; padding: 2px 4px; }
  .edfin { margin-top: auto; padding-top: 10px; gap: 6px; }
  .edfin .tool { min-height: 46px; }
  .edfin__sub .tool { min-height: 34px; }
  /* the strip: similar memes (and memes people made with this template) in one sliding row each, side by side */
  .editor > .similar { grid-row: 3; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px 16px 10px;
    border-top: 2px solid rgba(0, 0, 0, .35); background: rgba(27, 11, 69, .35); }
  .editor > .similar[hidden] { display: none; }
  .editor > #examples { grid-column: 1; }
  .editor > #similar { grid-column: 2; }
  .editor:has(> #examples[hidden]) > #similar { grid-column: 1 / 3; }
  .editor > #examples + #similar { border-inline-start: 2px solid rgba(0, 0, 0, .35); }
  .editor > .similar h3 { flex: none; max-width: 7.5em; margin: 0; font-size: 13.5px; line-height: 1.25; color: var(--ink-2); }
  .editor > .similar h3[hidden] { display: none; }
  #examplesMine { display: contents; }
  .editor > .similar .similar__row, .editor > .similar .examples__row { display: flex; flex-wrap: nowrap; flex: 1 1 auto; min-width: 0; gap: 8px; margin: 0;
    overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; padding-bottom: 3px; }
  #examplesMine .examples__row { flex: 0 1 auto; margin: 0; }
  .editor > .similar .tile, .editor > .similar .ccard { flex: 0 0 auto; width: var(--strip, clamp(56px, 9.5vh, 92px)); height: var(--strip, clamp(56px, 9.5vh, 92px));
    aspect-ratio: 1; margin: 0; }
  .editor > .similar .ccard { display: block; overflow: hidden; padding: 0; }
  .editor > .similar .ccard > :not(.ccard__pic) { display: none; }
  .editor > .similar .ccard__pic { width: 100%; height: 100%; }
  .editor > .similar .ccard__pic img { width: 100%; height: 100%; object-fit: cover; }
  .editor > .editor__foot { grid-row: 3; grid-column: 3; flex-direction: column; align-items: flex-end; justify-content: center; gap: 2px;
    max-width: 210px; padding: 6px 16px; border-top: 2px solid rgba(0, 0, 0, .35); background: rgba(27, 11, 69, .35); font-size: 12.5px; }
  .editor > .editor__foot .editor__by { font-size: 12.5px; text-align: end; }
  .editor > .editor__foot .editor__report a { padding: 2px 0; font-size: 12.5px; }
}
/* a low screen: the same layout, tighter */
@media (min-width: 821px) and (max-height: 760px) {
  .editor__body { padding: 10px 14px; gap: 12px; }
  .panel, #mainControls { gap: 6px; }
  .edbar .tool { min-height: 46px; padding: 3px 2px; gap: 1px; font-size: 12.5px; }
  .edfin { padding-top: 8px; }
  .edbar .tool img { width: 22px; height: 22px; }
  .chip { min-height: 30px; font-size: 13.5px; }
  .tbox { padding: 6px; gap: 6px; }
  .tbox textarea { min-height: 38px; max-height: 64px; font-size: 16px; }
  .tbox .ibtn { width: 31px; height: 31px; }
  .tbox .ibtn--swatch { width: 23px; }
  .tbox__icons { gap: 5px; }
  .ibtn img { width: 21px; height: 21px; }
  .seg--band button { min-height: 32px; }
  .edflip { min-height: 30px; }
  .edfin .tool { min-height: 40px; font-size: 15px; }
  .edfin__main .tool--gold { font-size: 16px; }
  .edfin__sub .tool { min-height: 30px; font-size: 13px; }
  .stage__hint { display: none; }
  .editor > .similar { padding: 6px 14px 8px; }
}

/* the home title comes alive (25.11.2026, Daniel: "חותמת + ברק וגם ציור של האותיות אחת אחרי השניה"), site/gm-title.js:
   the letters are drawn one after another right to left, the crown drops onto the מ, the title lands like a stamp;
   then a shine crosses the letters every 7 s. The picture itself stays the title; the letters are a short-lived layer. */
.gtitle { position: relative; display: block; width: fit-content; margin-inline: auto; }
.gtitle__shine, .gtitle__parts { position: absolute; inset: 0; pointer-events: none; }
.gtitle__shine { display: none; }
.gtitle__part { position: absolute; display: block; }
@keyframes gm-draw { from { clip-path: inset(-6% -6% -6% 100%); translate: 0 6%; scale: 1.1; } to { clip-path: inset(-6%); translate: 0 0; scale: 1; } }
@keyframes gm-crown-drop {
  0% { opacity: 0; translate: 0 -150%; rotate: -14deg; animation-timing-function: cubic-bezier(.55, 0, 1, .45); }
  12% { opacity: 1; }
  62% { translate: 0 0; rotate: 2deg; scale: 1.14 .84; animation-timing-function: var(--ease-out); }
  100% { opacity: 1; translate: 0 0; rotate: 0deg; scale: 1; }
}
@keyframes gm-stamp {
  0% { scale: 1; rotate: 0deg; }
  20% { scale: 1.07; rotate: -1.4deg; }
  46% { scale: .95; rotate: .9deg; }
  72% { scale: 1.02; rotate: -.3deg; }
  100% { scale: 1; rotate: 0deg; }
}
@keyframes gm-shine { 0% { background-position: 0 0; } 18%, 100% { background-position: 100% 0; } }
@media (prefers-reduced-motion: no-preference) {
  .gtitle.is-prep > .titlepic { opacity: 0; }
  .home.is-intro .home__title.is-drawn { animation: gm-breathe 2.8s var(--ease-in-out) 1.8s infinite alternate; }
  .gtitle__part { transform-origin: 50% 85%; animation: gm-draw 240ms var(--ease-out) both; animation-delay: calc(120ms + var(--i) * 72ms); }
  .gtitle__part--crown { transform-origin: 50% 100%; animation: gm-crown-drop 440ms both; animation-delay: 860ms; }
  .gtitle.is-drawing { transform-origin: 50% 70%; animation: gm-stamp 420ms var(--ease-out) 1130ms both; }
  .gtitle__shine { display: block;
    background: linear-gradient(105deg, rgba(255, 255, 255, 0) 42%, rgba(255, 255, 255, .85) 50%, rgba(255, 255, 255, 0) 58%) 0 0 / 300% 100% no-repeat;
    -webkit-mask: url(ui/title-shine.webp) 0 0 / 100% 100% no-repeat; mask: url(ui/title-shine.webp) 0 0 / 100% 100% no-repeat;
    animation: gm-shine 7s var(--ease-in-out) 2.2s infinite both; }
  .gtitle.is-prep > .gtitle__shine { display: none; }
}
