/* הצבעים נדגמו מהכרזה הרשמית של "תרבות בונה מקום" (המפעל): נייר שמנת, דיו כמעט שחור,
   אדום-כתום של התאריך, ובלוקים של כחול, ירוק, חרדל ובורדו כמו בבניינים. האפליקציה תמיד בהירה, כמו הכרזה. */
:root {
  --bg: #FFFFF0;
  --surface: #FFFFFF;
  --surface-2: #F5EEDF;
  --ink: #231F20;
  --muted: #5F5850;
  --line: #E8DFCD;
  --primary: #231F20;
  --primary-ink: #FFFFF0;
  --hl: #D04F2F;
  --hl-soft: #FAE4DB;
  --talk: #9A5F05;
  --talk-soft: #FBEBCB;
  --talking: #264C8A;
  --talking-soft: #DFE7F3;
  --collab: #2D5C41;
  --collab-soft: #DCEBDD;
  --danger: #A43A45;
  /* צבעי הכרזה לקישוט בלבד (לא לטקסט) */
  --p-blue: #264C8A; --p-sky: #3880A6; --p-red: #D04F2F; --p-wine: #A43A45; --p-green: #2D5C41;
  --p-leaf: #55923F; --p-mustard: #F0A641; --p-ochre: #DA8F2D; --p-teal: #3CAEB6; --p-pink: #DC8593; --p-sand: #EDE0CE;

  --font-display: 'Assistant', 'Noto Sans Arabic', 'Arial Hebrew', sans-serif;
  --font-body: 'Assistant', 'Noto Sans Arabic', 'Segoe UI', Arial, sans-serif;

  --r: 12px;
  --nav-h: 64px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 17px; line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
a { color: var(--hl); }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--hl); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p, li, dd, b, small, .hint, label, .card a, .card span { text-wrap: pretty; }
p { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.boot { min-height: 100vh; display: grid; place-items: center; color: var(--muted); }

/* ───── מעטפת ───── */
.shell { min-height: 100vh; display: grid; grid-template-rows: auto auto 1fr; }
.demo-bar {
  background: var(--ink); color: var(--bg); text-align: center; font-size: 14px; font-weight: 600;
  padding: 4px max(16px, env(safe-area-inset-right, 0px)) 4px max(16px, env(safe-area-inset-left, 0px));
}
.demo-bar button { background: none; border: 0; color: inherit; text-decoration: underline; cursor: pointer; padding: 0 6px; font-size: 14px; }
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--bg);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px));
  border-bottom: 2px solid var(--ink);
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand b { font-family: var(--font-display); font-weight: 800; font-size: 24px; line-height: 1; display: block; }
.brand small { display: block; font-size: 12px; color: var(--hl); line-height: 1.3; margin-top: 2px; }

.layout { display: grid; grid-template-columns: 1fr; }
main {
  width: 100%; max-width: 760px; margin: 0 auto; min-width: 0;
  padding-block: 20px calc(var(--nav-h) + 32px + env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: grid; gap: 20px; align-content: start;
}

.nav {
  position: fixed; inset: auto 0 0 0; z-index: 6; background: var(--bg); border-top: 2px solid var(--ink);
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 0 env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
}
.nav a {
  height: var(--nav-h); display: grid; place-items: center; align-content: center; gap: 2px;
  text-decoration: none; color: var(--muted); font-size: 12.5px; font-weight: 600; position: relative; text-align: center; line-height: 1.2;
}
.nav a svg { width: 24px; height: 24px; }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::before { content: ""; position: absolute; top: -2px; inset-inline: 20%; height: 4px; background: var(--hl); }
.nav .dot { position: absolute; top: 8px; inset-inline-start: calc(50% + 6px); min-width: 18px; height: 18px; border-radius: 9px; background: var(--hl); color: #fff; font-size: 11px; display: grid; place-items: center; padding: 0 4px; }

@media (min-width: 900px) {
  .layout { grid-template-columns: 220px 1fr; }
  .nav {
    position: sticky; inset: auto; top: 64px; height: calc(100vh - 64px); align-self: start;
    display: flex; flex-direction: column; gap: 4px; padding: 20px 12px; border-top: 0;
    border-inline-end: 2px solid var(--ink);
  }
  .nav a { height: auto; display: flex; justify-content: flex-start; gap: 12px; padding: 10px 14px; border-radius: 10px; font-size: 16px; }
  .nav a[aria-current="page"] { background: var(--surface-2); }
  .nav a[aria-current="page"]::before { top: 8px; bottom: 8px; inset-inline: auto; inset-inline-start: -12px; width: 4px; height: auto; border-radius: 2px; }
  .nav .dot { position: static; margin-inline-start: auto; }
  main { padding-bottom: 48px; }
}

/* ───── טיפוגרפיה ───── */
.page-title { font-family: var(--font-display); font-weight: 800; font-size: 36px; line-height: 1.05; letter-spacing: -.3px; }
.page-sub { color: var(--muted); margin-top: 6px; }
.section-title { font-size: 19px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.section-title a { font-size: 15px; font-weight: 600; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .4px; color: var(--hl); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.num { font-variant-numeric: tabular-nums; }
.prose { white-space: pre-line; overflow-wrap: anywhere; max-width: 65ch; }
.selectable { user-select: all; }
/* תוכן שהמשתתפים והצוות כתבו מקבל את הכיוון של השפה שבה נכתב, בלי קשר לשפת הממשק */
.slot h3, .slot p, .prose, .person .name, .person .line, .qa dd, .host h3, .announce h3,
.info-item h3, .profile-head h1, .profile-head p, .session-title, .now b, .hosts-mini span {
  unicode-bidi: plaintext; text-align: start;
}
.center { text-align: center; }
.center .section-title { justify-content: center; }

.back { text-decoration: none; font-weight: 600; }
.back::before { content: "→ "; }
[dir="ltr"] .back::before { content: "← "; }

/* ───── כרזה (מסך כניסה ובית): כמו הכרזה המקורית — שמנת, כותרת שחורה, תאריך אדום-כתום, העיר מתחת ופס כהה עם הלוגו ───── */
.poster { background: #FFFFF0; display: grid; overflow: hidden; border-radius: var(--r); }
.poster-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 20px 14px; }
.brand-title { display: block; width: 128px; height: auto; flex: none; }
.poster-meta { display: grid; gap: 0; color: var(--hl); font-size: 22px; line-height: 1.1; font-weight: 300; text-align: end; padding-top: 4px; }
.poster-meta b { font-weight: 800; font-size: 27px; letter-spacing: .5px; margin-top: 2px; }
.poster-meta small { color: var(--muted); font-size: 14px; font-weight: 400; margin-top: 6px; }
.city { position: relative; display: block; }
.city img { display: block; }
.city-base { width: 100%; height: auto; }
.city-donut { position: absolute; left: 0; top: .99%; width: 14.34%; height: auto; transform-origin: 49.5% 50%; will-change: transform; }
.city-dial { position: absolute; left: 64.29%; width: 6.475%; height: auto; transform-origin: 49.4% 50%; will-change: transform; }
.city-tree { position: absolute; height: auto; }
/* הרוח: rotate נפרד מה-transform של הגלילה, כך שהשניים מצטברים */
.city-tree.a { left: 34.97%; top: 40.64%; width: 3.05%; transform-origin: 49.7% 100%; animation: breeze 3.2s ease-in-out infinite alternate; }
.city-tree.b { left: 38.02%; top: 42.13%; width: 2.13%; transform-origin: 37.8% 100%; animation: breeze 2.6s ease-in-out -1.1s infinite alternate; }
@keyframes breeze { from { rotate: -4deg; } to { rotate: 4deg; } }
@media (prefers-reduced-motion: reduce) { .city-tree { animation: none; } }
.poster-foot { background: var(--ink); display: flex; justify-content: flex-start; padding: 10px 20px; }
.poster-foot img { display: block; height: 40px; width: auto; }
.now { padding: 12px 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 15px; display: grid; }
.now b { font-size: 17px; }
.now > span { color: var(--hl); font-weight: 600; font-size: 14px; }

/* ───── רכיבים ───── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.callout { border: 2px solid var(--hl); }
.stack { display: grid; gap: 12px; }
.stack.tight { gap: 4px; }
.gap-lg { gap: 20px; }
.row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.plain { text-decoration: none; color: inherit; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1.5px solid var(--ink);
  background: var(--surface); color: var(--ink); font-weight: 700; cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { filter: brightness(1.15); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--hl); padding: 0 8px; }
.btn.ghost:hover { background: var(--hl-soft); }
.btn.danger { color: var(--danger); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; }
label.btn { user-select: none; }

.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 15px; }
.field .hint { font-size: 13px; color: var(--muted); }
.input, textarea.input, select.input {
  width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface);
}
textarea.input { min-height: 96px; resize: vertical; line-height: 1.5; }
.input:focus { outline: 2px solid var(--ink); outline-offset: 0; border-color: transparent; }
.input.ltr { direction: ltr; text-align: start; }
[dir="rtl"] .input.ltr { text-align: right; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--ink); }
.lang select { min-height: 40px; padding: 6px 10px; width: auto; }

.avatar {
  flex: none; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: 17px;
  background: var(--av-bg, var(--p-blue)); color: var(--av-ink, #FFFFF0);
}
.avatar.lg { width: 76px; height: 76px; font-size: 26px; }
.avatar.sm { width: 36px; height: 36px; font-size: 14px; }
.avatar.xs { width: 24px; height: 24px; font-size: 11px; }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 2px 10px;
  border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--surface-2); color: var(--ink); white-space: nowrap;
}
.chip.talk { background: var(--talk-soft); color: var(--talk); }
.chip.talking { background: var(--talking-soft); color: var(--talking); }
.chip.collab { background: var(--collab-soft); color: var(--collab); }
.chip.reason { background: var(--hl-soft); color: var(--hl); white-space: normal; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.swatch { width: 10px; height: 10px; border-radius: 50%; background: currentColor; }

.filter-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.filter-chips button { flex: none; border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; min-height: 36px; padding: 0 14px; cursor: pointer; font-size: 14px; font-weight: 600; }
.filter-chips button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* רשימת אנשים */
.people { display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.person { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; text-decoration: none; color: inherit; border-bottom: 1px solid var(--line); }
.person:last-child { border-bottom: 0; }
.person:hover { background: var(--surface-2); }
.person .name { font-weight: 700; display: block; }
.person .line { display: block; font-size: 15px; color: var(--muted); overflow-wrap: anywhere; }
.person .chips { margin-top: 6px; }

/* בית */
.hello { display: grid; gap: 2px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; text-decoration: none; color: inherit; display: grid; gap: 2px; align-content: start; }
.stat b { font-family: var(--font-display); font-weight: 800; font-size: 32px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { font-size: 14px; color: var(--muted); line-height: 1.3; }
.stat:nth-child(1) b { color: var(--talking); }
.stat:nth-child(2) b { color: var(--hl); }
.stat:nth-child(3) b { color: var(--collab); }
.announce { }
.announce h3 { font-size: 17px; }

/* פרופיל משתתף */
.profile-head { display: flex; gap: 16px; align-items: center; }
.profile-head h1 { font-size: 26px; line-height: 1.2; }
.qa { display: grid; gap: 4px; }
.qa dt { font-size: 14px; font-weight: 700; color: var(--muted); }
.qa dd { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.types { display: grid; gap: 8px; }
.type-opt {
  display: flex; gap: 12px; align-items: center; text-align: start; width: 100%;
  padding: 12px 14px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer;
}
.type-opt b { display: block; }
.type-opt small { color: var(--muted); font-size: 14px; }
.type-opt .swatch { width: 14px; height: 14px; flex: none; }
.type-opt[data-type="talk"] { color: var(--talk); }
.type-opt[data-type="talking"] { color: var(--talking); }
.type-opt[data-type="collab"] { color: var(--collab); }
.type-opt > span:last-child { color: var(--ink); }
.type-opt[aria-pressed="true"] { border-color: currentColor; border-width: 2px; background: var(--surface-2); }
.incoming { background: var(--talk-soft); color: var(--ink); border-radius: 10px; padding: 10px 12px; font-size: 15px; display: grid; gap: 6px; }
.intro-quote { display: block; background: var(--talk-soft); padding: 8px 12px; border-radius: 10px; font-size: 15px; color: var(--ink); white-space: pre-line; overflow-wrap: anywhere; unicode-bidi: plaintext; text-align: start; margin-top: 6px; }
.chip.mutual { background: var(--ink); color: var(--bg); }
textarea.input.short { min-height: 64px; }
.prefs { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 0; }
.prefs legend { padding: 0 6px; }

/* פס עדכון חי */
.live-banner {
  position: sticky; top: calc(env(safe-area-inset-top, 0px) + 60px); z-index: 4;
  display: flex; align-items: center; gap: 8px; background: var(--hl); color: #fff;
  padding: 8px max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px));
}
.live-banner a { color: inherit; text-decoration: none; flex: 1; min-width: 0; display: grid; }
.live-banner .eyebrow { color: inherit; opacity: .9; }
.live-banner b { unicode-bidi: plaintext; text-align: start; }
.live-banner .icon-btn { color: inherit; font-size: 18px; width: 40px; height: 40px; border: 0; background: transparent; cursor: pointer; flex: none; }

/* לו"ז */
.timeline { display: grid; margin-top: 4px; }
.slot { display: grid; grid-template-columns: 64px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.slot:last-child { border-bottom: 0; }
.slot time { font-weight: 700; padding-top: 1px; }
.slot time small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
.slot h3 { font-size: 17px; }
.slot.now { background: var(--hl-soft); margin-inline: -16px; padding-inline: 16px; border-radius: 10px; border-bottom-color: transparent; }
.slot.past { opacity: .55; }
.slot.link { grid-template-columns: 64px 1fr 16px; text-decoration: none; color: inherit; }
.slot.link:hover h3 { color: var(--hl); }
.chev { align-self: center; width: 10px; height: 10px; border-left: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); }
[dir="ltr"] .chev { transform: rotate(-135deg); }
.tags { gap: 6px; }
.now-tag { color: var(--hl); font-weight: 700; font-size: 13px; }
.hosts-mini { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 14px; color: var(--muted); }
.host-pill { display: inline-flex; align-items: center; gap: 6px; }
.host { display: flex; gap: 16px; align-items: flex-start; }
.host h3 { font-size: 19px; }
@media (max-width: 520px) { .host { flex-direction: column; } }
.host-edit { border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin: 0; background: var(--bg); }

/* מידע */
.address { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; border: 2px solid var(--ink); }
.info-list { display: grid; padding: 0; }
.info-list > * { padding: 16px; border-bottom: 1px solid var(--line); }
.info-list > *:last-child { border-bottom: 0; }
.info-list form.card { border: 0; border-radius: 0; }
.info-item { display: grid; gap: 4px; }
.info-item h3 { font-size: 17px; }

/* QR */
.qr { width: 200px; max-width: 100%; aspect-ratio: 1; background: #fff; border-radius: 12px; padding: 10px; margin-inline: auto; border: 2px solid var(--ink); }
.qr svg { width: 100%; height: 100%; display: block; }

/* כניסה */
.login { min-height: 100vh; display: grid; place-items: center; padding-block: 24px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.login-box { width: 100%; max-width: 440px; display: grid; gap: 14px; }
.login .card { padding: 22px; }
.app-name { font-family: var(--font-display); font-weight: 800; font-size: 34px; line-height: 1; }
.err { color: var(--danger); font-size: 15px; }
.err:empty { display: none; }

/* ניהול */
.tabs { display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 12px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--hl); }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: start; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; color: var(--muted); }
td.ltr { direction: ltr; text-align: right; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) {
  .grid-2 { grid-template-columns: 1fr; }
  .stat b { font-size: 26px; }
  .page-title { font-size: 30px; }
}

.empty { text-align: center; color: var(--muted); padding: 28px 16px; display: grid; gap: 10px; justify-items: center; }

#toast {
  position: fixed; z-index: 20; inset-inline: 16px; bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom, 0px));
  margin-inline: auto; max-width: 420px; background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 10px;
  font-weight: 600; text-align: center; box-shadow: 0 6px 20px rgb(0 0 0 / .18);
}
@media (min-width: 900px) { #toast { bottom: 24px; } }

@media (prefers-reduced-motion: no-preference) {
  main > * { animation: rise .25s ease-out both; }
  @keyframes rise { from { transform: translateY(6px); } to { transform: none; } }
}

.contact-actions { gap: 8px; }
.small-btn { min-height: 38px; padding: 0 14px; font-size: 15px; }

/* הרשמה לסדנאות */
.meter { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--collab); border-radius: 4px; }
.joined { color: var(--collab); font-weight: 700; }
.who { display: flex; flex-wrap: wrap; gap: 6px; }
.who a { text-decoration: none; }

/* משוב */
.rating { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.rating legend { font-weight: 600; padding: 0; margin-bottom: 6px; }
.scale { display: flex; flex-wrap: wrap; gap: 6px; }
.scale label { cursor: pointer; }
.scale input { position: absolute; opacity: 0; pointer-events: none; }
.scale span { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 10px; border: 1.5px solid var(--line); border-radius: 10px; font-weight: 700; background: var(--surface); }
.scale .skip span { font-weight: 600; font-size: 14px; color: var(--muted); }
.scale input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.scale input:focus-visible + span { outline: 3px solid var(--hl); outline-offset: 2px; }

/* סטטיסטיקה */
.stats-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 620px) { .stats-4 { grid-template-columns: repeat(2, 1fr); } }
.quote { margin: 0; padding: 8px 12px; background: var(--surface-2); border-radius: 10px; }
.quote cite { display: block; font-style: normal; font-size: 13px; color: var(--muted); margin-top: 4px; }
/* סדנה בלו"ז */
.slot.workshop { grid-template-columns: 64px 1fr; }
.slot.workshop.picked { background: var(--collab-soft); margin-inline: -16px; padding-inline: 16px; border-radius: 10px; border-bottom-color: transparent; }
.slot.workshop h3:hover { color: var(--hl); }
.slot-actions { gap: 10px; margin-top: 4px; }

/* ההתאמות שלי */
.person.match { align-items: flex-start; }
.person.match .name { font-weight: 700; }

/* בלי קליטה */
.offline-bar { background: var(--ink); color: var(--bg); text-align: center; font-size: 14px; font-weight: 600;
  padding: 6px max(16px, env(safe-area-inset-right, 0px)) 6px max(16px, env(safe-area-inset-left, 0px)); }
/* טקסט גדול (הגדלת גופן בטלפון או זום בדפדפן): הכול נשבר לשורות במקום לגלוש הצידה */
body { overflow-wrap: break-word; }
.page-title, .section-title, .stack-title, .app-name { overflow-wrap: anywhere; }
.row { flex-wrap: wrap; }
.live-banner, .person, .profile-head, .host { flex-wrap: nowrap; }
.brand { flex: 1; }
.brand > span { min-width: 0; }
.brand b, .brand small { overflow-wrap: anywhere; }
.nav a { min-width: 0; height: auto; min-height: var(--nav-h); padding: 6px 2px; }
.nav a > span:not(.dot) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 900px) { .nav a > span:not(.dot) { white-space: normal; } }
.stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats.stats-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 600px) { .stats.stats-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat span { overflow-wrap: anywhere; }
.slot, .slot.link, .slot.workshop { grid-template-columns: minmax(3.6em, auto) minmax(0, 1fr) auto; }
.slot.workshop { grid-template-columns: minmax(3.6em, auto) minmax(0, 1fr); }
.chip { white-space: normal; }
.demo-bar { overflow-wrap: anywhere; }.nav { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.poster-meta > * { min-width: 0; max-width: 100%; }
.now { min-width: 0; }
.now b, .now span { overflow-wrap: anywhere; }
main { grid-template-columns: minmax(0, 1fr); }
main > *, .stack > *, .card > * { min-width: 0; }
.qr { width: min(200px, 100%); }

.layout { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .layout { grid-template-columns: 220px minmax(0, 1fr); } }
.people, .timeline, .types, .info-list { grid-template-columns: minmax(0, 1fr); }
.person > .grow, .person .name, .person .line { min-width: 0; overflow-wrap: anywhere; }

/* הודעות שקיבלתי */
.person.message.fresh { background: var(--talk-soft); }
.person.message .name { display: block; }

.slot.workshop { scroll-margin-top: 80px; }
.ltr-inline { direction: ltr; unicode-bidi: isolate; }

/* קוד QR: הריבוע נקבע לפי הקוד עצמו, בלי רווח מיותר למטה */
.qr { width: min(220px, 100%); aspect-ratio: auto; height: auto; line-height: 0; }
.qr svg { width: 100%; height: auto; aspect-ratio: 1; }
/* נקודה על לשונית המידע כשיש עדכון חדש */
.nav .dot[data-dot-info] { min-width: 10px; width: 10px; height: 10px; padding: 0; top: 12px; }
@media (min-width: 900px) { .nav .dot[data-dot-info] { width: 10px; } }
/* מה חדש */
.news { border: 2px solid var(--hl); }
.news-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-weight: 600; }
.news-item:first-of-type { border-top: 0; }
.news-item .grow { unicode-bidi: plaintext; text-align: start; }

/* במחשב עם עכבר אין גלילה לצדדים בשורת הנושאים ובלשוניות הניהול, אז הן נשברות לכמה שורות */
@media (hover: hover) and (pointer: fine) {
  .filter-chips { flex-wrap: wrap; overflow-x: visible; }
  .tabs { flex-wrap: wrap; overflow-x: visible; }
}

/* ───────── בקרת משתמשים, דיווח וצ'ק-אין ───────── */
.chip.danger { background: var(--hl-soft); color: var(--danger); }
tr.suspended td { opacity: .6; }
.request { border-top: 1px solid var(--line); padding-top: 12px; }
.request:first-of-type { border-top: 0; padding-top: 0; }
.report-box { color: var(--muted); }
.report-box summary { cursor: pointer; padding: 6px 0; }
.report-box form { margin-top: 8px; color: var(--ink); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* מסך בלי תפריט: עמדת צ'ק-אין ומסך הקרנה */
.shell.bare .topbar, .shell.bare .nav, .shell.bare #live-banner { display: none !important; }
.shell.bare .layout { display: block; }
.shell.bare main#view { max-width: none; padding: 16px; margin: 0; }
.kiosk-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .kiosk-grid { grid-template-columns: 1fr 1fr; } }
.cam-wrap { position: relative; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.kiosk video { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.k-pop { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; padding: 16px; text-align: center; color: #FFFFF0; background: rgb(45 92 65 / .92); animation: k-pop .18s ease-out; }
.k-pop.bad { background: rgb(164 58 69 / .92); }
.k-pop .btn { background: #FFFFF0; color: var(--ink); border-color: #FFFFF0; }
.k-pop .btn.ghost { background: transparent; color: #FFFFF0; }
.k-check { font-size: 56px; line-height: 1; font-weight: 800; }
@keyframes k-pop { from { opacity: 0; transform: scale(.96); } }
@media (prefers-reduced-motion: reduce) { .k-pop { animation: none; } }
.kiosk-person { display: grid; gap: 2px; text-align: start; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; }
.kiosk-person:hover { border-color: var(--ink); }
.kiosk-result.ok { border: 2px solid var(--collab); background: var(--collab-soft); }
.kiosk-hello { font-size: clamp(24px, 4vw, 40px); font-family: var(--font-display); line-height: 1.15; }

.screen { min-height: calc(100vh - 32px); display: flex; flex-direction: column; gap: 3vh; font-size: clamp(16px, 1.6vw, 30px); }
.screen-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 2px solid var(--ink); padding-bottom: 2vh; }
.screen-head time { font-size: 3em; font-weight: 800; }
.screen-head .brand-title { width: 9em; }
.screen-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3vw; }
.screen h2 { font-size: 1em; text-transform: uppercase; letter-spacing: .05em; color: var(--hl); margin: 0 0 1vh; }
.screen-slot { display: grid; gap: .2em; margin-bottom: 2vh; }
.screen-slot time { font-weight: 800; font-size: 1.1em; }
.screen-slot b { font-size: 1.8em; line-height: 1.15; }
.screen-slot span, .screen-muted { color: var(--muted); font-size: 1.1em; }
.screen-ann { background: var(--surface); border: 2px solid var(--ink); border-radius: var(--r); padding: 2vh 2vw; }
.screen-ann b { font-size: 1.5em; display: block; }
.screen-ann p { margin: .5em 0 0; white-space: pre-line; }
.screen-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2vw; margin-top: auto; }
.screen-stat { display: grid; gap: .2em; }
.screen-stat b { font-size: 3.4em; line-height: 1; font-weight: 800; }
.screen-stat span { color: var(--muted); }
.screen-foot { color: var(--muted); margin: 0; }
.screen-tools { position: fixed; bottom: 12px; inset-inline-start: 12px; display: flex; gap: 6px; opacity: .15; transition: opacity .2s; }
.screen-tools:hover, .screen-tools:focus-within { opacity: 1; }
@media (max-width: 700px) { .screen-grid, .screen-stats { grid-template-columns: 1fr 1fr; } .screen-grid { grid-template-columns: 1fr; } }

/* הכותרת בפינה נעלמת בדף הבית כל עוד הכותרת הגדולה בכרזה על המסך */
.topbar .brand img { transition: opacity .18s ease-out, transform .18s ease-out; }
.topbar.mark-off .brand img { opacity: 0; transform: translateY(4px); }
@media (prefers-reduced-motion: reduce) { .topbar .brand img { transition: none; } }
.credit { text-align: center; color: var(--muted); font-size: 13px; margin-top: 8px; }
.credit a { color: inherit; }
.sfx { display: inline-block; cursor: pointer; transition: transform .16s ease-out, opacity .16s ease-out; -webkit-user-select: none; user-select: none; }
.sfx.out { opacity: 0; transform: translateY(-35%); }
.sfx.in { opacity: 0; transform: translateY(35%); transition: none; }
@media (prefers-reduced-motion: reduce) { .sfx { transition: none; } }

/* הכדור הגדול: אפשר לגרור ולזרוק. הבניין הכחול שלפניו נשאר מעליו כל עוד הכדור במקום */
.city-ball { position: absolute; left: 57.08%; top: 61.65%; width: 28.58%; aspect-ratio: 1; cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.city-ball svg, .free-ball svg { display: block; width: 100%; height: 100%; }
.city-front { position: absolute; left: 56.89%; top: 61.59%; width: 28.955%; height: auto; pointer-events: none; }
.free-ball { position: fixed; left: 0; top: 0; z-index: 40; touch-action: none; cursor: grab; will-change: transform; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; filter: drop-shadow(0 6px 10px rgb(35 31 32 / .18)); }
.free-ball.held { cursor: grabbing; }

/* ───── משחק זיכרון ───── */
body.no-scroll { overflow: hidden; }
.memory { position: fixed; inset: 0; z-index: 60; background: rgb(35 31 32 / .55); display: grid; place-items: center; padding: max(12px, env(safe-area-inset-top)) 12px 12px; animation: mem-in .2s ease-out; }
.memory-box { position: relative; width: min(480px, 100%); max-height: 100%; overflow: auto; background: var(--bg); border-radius: 16px; padding: 14px; display: grid; gap: 12px; }
.memory-head { display: flex; align-items: center; gap: 10px; }
.memory-head b { font-size: 20px; flex: 1; }
.memory-x { width: 40px; height: 40px; border: 0; background: var(--surface-2); border-radius: 50%; font-size: 24px; line-height: 1; cursor: pointer; }
.memory-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 420px) { .memory-grid { grid-template-columns: repeat(4, 1fr); } }
.mcard { aspect-ratio: 3 / 4; border: 0; padding: 0; background: none; cursor: pointer; perspective: 600px; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.mcard-in { position: relative; display: block; width: 100%; height: 100%; transition: transform .32s cubic-bezier(.3, .7, .3, 1); transform-style: preserve-3d; }
.mcard.up .mcard-in, .mcard.done .mcard-in { transform: rotateY(180deg); }
.mcard-back, .mcard-face { position: absolute; inset: 0; border-radius: 12px; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
/* גב הקלף: עיגול בצבעי הכרזה, כמו הדונאט באיור */
.mcard-back { background: var(--surface-2); display: grid; place-items: center; }
.mcard-back::after { content: ""; width: 72%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, var(--surface-2) 0 31%, transparent 32%), conic-gradient(from 30deg, var(--p-leaf) 0 30%, var(--p-mustard) 0 47%, var(--p-green) 0 50%, var(--p-pink) 0 62%, var(--p-blue) 0 69%, var(--p-sky) 0 82%, var(--p-wine) 0 94%, var(--p-red) 0); }
.mcard-face { transform: rotateY(180deg); background: var(--surface); border: 1px solid var(--line); display: grid; place-content: center; justify-items: center; gap: 6px; padding: 6px; }
.mcard-face .avatar.lg { width: min(64px, 15vw); height: min(64px, 15vw); font-size: 20px; }
.mcard-face small { font-size: 13px; font-weight: 700; line-height: 1.1; text-align: center; overflow-wrap: anywhere; }
.mcard.done .mcard-face { border-color: var(--collab); box-shadow: inset 0 0 0 2px var(--collab); }
.memory-who { min-height: 2.6em; margin: 0; font-size: 15px; text-align: center; }
.memory-win { position: absolute; inset: 0; background: rgb(255 255 240 / .94); border-radius: 16px; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; animation: mem-in .25s ease-out; }
.memory-win b { font-size: 30px; }
@keyframes mem-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .mcard-in { transition: none; } .memory, .memory-win { animation: none; } }
.drop-ball { position: absolute; left: 0; top: 0; pointer-events: none; will-change: transform; }
.drop-ball svg { display: block; width: 100%; height: 100%; }
