/* Hallmark · pre-emit critique: P4 H4 E4 S4 R5 V4
 * css/rotboard.css: לוח רוטציות S1. טוקנים מ-rotations-demo.html (DNA זכוכית/עומק).
 * כל הכללים ממוקדים ב-.app / dialog / .toast, לא דולפים ל-#authOverlay של auth.js.
 */
:root:not([data-theme="light"]) {
  color-scheme: dark;
  --bg: #0b1020;
  --bg2: #0f1630;
  --ink: #eef2f9;
  --ink2: rgba(238, 242, 249, 0.7);
  --ink3: rgba(238, 242, 249, 0.56);
  --surface: rgba(255, 255, 255, 0.045);
  --surface2: rgba(255, 255, 255, 0.07);
  --glass: rgba(13, 19, 38, 0.74);
  --glass-solid: #11182f;
  --sheet: rgba(20, 27, 52, 0.9);
  --stroke: rgba(255, 255, 255, 0.14);
  --stroke2: rgba(255, 255, 255, 0.07);
  --ac: #7c8cff;
  --ac2: rgba(124, 140, 255, 0.16);
  --acInk: #12142b;
  --ok: #34d399;
  --now-tint: rgba(124, 140, 255, 0.08);
  --hatch: rgba(255, 255, 255, 0.07);
  --info-ink: #cfe0ff;
  --info-bg: rgba(124, 140, 255, 0.16);
  --warn-ink: #fcd577;
  --warn-bg: rgba(251, 191, 36, 0.16);
  --due-ink: #fcaaaa;
  --due-bg: rgba(248, 113, 113, 0.16);
  --danger: #fca5a5;
  --scrim: rgba(3, 6, 15, 0.55);
  --shadow: rgba(0, 0, 0, 0.5);
  --toast-bg: #eef2f9;
  --toast-ink: #12142b;
  --r-ext: #94a3b8;
  --maternity-ink: #f9a8d4;
  --maternity-bg: rgba(244, 114, 182, 0.16);
  --research-ink: #67e8f9;
  --research-bg: rgba(45, 212, 191, 0.14);
  --stage-bg: #a78bfa; /* שלב ב׳ = סגול: אף צבע-רוטציה לא סגול */
  --stage-ink: #1e1036;
  --stage-a-bg: #ef4444; /* שלב א׳ = אדום (עידן 3.10), עמוק מהאדום של לב-חזה */
  --stage-a-ink: #fff;
  --reserve-ink: #bef264;
  --reserve-bg: rgba(163, 230, 53, 0.14);
  --nora-edge: rgba(238, 242, 249, 0.56);
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #eef1f8;
  --bg2: #e5eaf4;
  --ink: #141a2e;
  --ink2: rgba(20, 26, 46, 0.74);
  --ink3: rgba(20, 26, 46, 0.62);
  --surface: rgba(255, 255, 255, 0.6);
  --surface2: rgba(255, 255, 255, 0.88);
  --glass: rgba(246, 248, 253, 0.76);
  --glass-solid: #f3f5fa;
  --sheet: rgba(250, 251, 254, 0.9);
  --stroke: rgba(20, 26, 46, 0.15);
  --stroke2: rgba(20, 26, 46, 0.075);
  --ac: #4f5bd5;
  --ac2: rgba(79, 91, 213, 0.12);
  --acInk: #fff;
  --ok: #047857;
  --now-tint: rgba(79, 91, 213, 0.07);
  --hatch: rgba(20, 26, 46, 0.1);
  --info-ink: #3730a3;
  --info-bg: rgba(79, 91, 213, 0.13);
  --warn-ink: #92400e;
  --warn-bg: rgba(217, 119, 6, 0.15);
  --due-ink: #b91c1c;
  --due-bg: rgba(220, 38, 38, 0.11);
  --danger: #b91c1c;
  --scrim: rgba(20, 26, 46, 0.3);
  --shadow: rgba(20, 26, 46, 0.2);
  --toast-bg: #141a2e;
  --toast-ink: #eef2f9;
  --r-ext: #64748b;
  --maternity-ink: #be185d;
  --maternity-bg: rgba(219, 39, 119, 0.13);
  --research-ink: #0e7490;
  --research-bg: rgba(13, 148, 136, 0.12);
  --stage-bg: #7c3aed;
  --stage-ink: #fff;
  --stage-a-bg: #dc2626;
  --stage-a-ink: #fff;
  --reserve-ink: #4d7c0f;
  --reserve-bg: rgba(101, 163, 13, 0.12);
  --nora-edge: #000000;
}
:root {
  /* דוח תוכנית התמחות (הדפסה): נייר לבן קבוע, בלי קשר למצב כהה/בהיר במסך */
  --rp-paper: #fff;
  --rp-ink: #14171f;
  --rp-muted: #5b6475;
  --rp-line: #d3d7e0;
  --rp-tint: #f3f5f9;
  --rp-bad: #b42318;
  --rp-stage-bg: #7c3aed;
  --rp-stage-ink: #fff;
  --rp-stage-a-bg: #dc2626;
  --rp-ext: #64748b;
  --f-head: "Heebo", system-ui, sans-serif;
  --f-body: "IBM Plex Sans Hebrew", "Heebo", system-ui, sans-serif;
  --radius: 22px;
  --radius-sm: 14px;
  --radius-bar: 10px;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --lane-h: 46px;
  --nora: #000000;
  --nora-ink: #ffffff;
}

[hidden] {
  display: none !important;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  overflow-x: clip;
}
body {
  min-block-size: 100dvh;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
  color: var(--ink);
  font: 400 15px/1.5 var(--f-body);
  font-variant-numeric: tabular-nums;
}
button {
  font: inherit;
  color: inherit;
}
.app h1,
dialog h2,
dialog h3 {
  margin: 0;
  font-family: var(--f-head);
  font-style: normal;
  overflow-wrap: anywhere;
  min-width: 0;
}
.app :focus-visible,
dialog :focus-visible {
  outline: 2px solid var(--ac);
  outline-offset: 2px;
}

/* ---- מעטפת ---- */
.app {
  /* עידן 30.9: בלי שטח מת, כל רוחב המסך (היה 1440px) */
  margin-inline: auto;
  overflow-x: clip;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(32px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
.appbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 12px 20px;
  padding-block: 4px 10px;
}
.crumb {
  font-size: 12px;
  color: var(--ink3);
}
.app h1 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}
.ab-ctrl {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.phone-note {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--ink2);
}
.msg {
  margin-block: 24px;
  padding: 16px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink2);
}

/* ---- כפתורים ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-block-size: 36px;
  padding: 0 14px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
  background: var(--surface2);
  color: var(--ink);
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none; /* גם <a class="btn"> (חזרה ל-ATLAS) */
  transition:
    background 0.15s,
    transform 0.1s;
}
.btn:active {
  transform: translateY(1px);
}
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.btn[aria-busy="true"] {
  cursor: progress;
  opacity: 0.7;
}
.btn.primary {
  background: var(--ac);
  border-color: var(--ac);
  color: var(--acInk);
}
.btn.danger {
  background: transparent;
  color: var(--danger);
  border-color: color-mix(in oklab, var(--danger) 45%, transparent);
}
.btn.ghost {
  background: transparent;
}
.btn.sm {
  min-block-size: 28px;
  padding: 0 10px;
  font-size: 13px;
}
@media (hover: hover) and (pointer: fine) {
  .btn:not(:disabled):not(.primary):hover {
    background: var(--ac2);
  }
  .nm-btn:hover {
    text-decoration: underline;
  }
}

/* ---- הלוח ---- */
.panel {
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: clip;
}
.board {
  --namew: 132px;
  --mw: max(58px, calc((100cqi - var(--namew)) / 12));
  --cols: var(--namew) repeat(var(--nm), var(--mw));
  position: relative;
  overflow: auto;
  max-block-size: 72dvh;
  container-type: inline-size;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
@media (min-width: 40rem) {
  .board {
    --namew: 184px;
  }
}
.board.grab {
  cursor: grab;
}
.board.dragging {
  cursor: grabbing;
  user-select: none;
}
.hd,
.grp,
.row {
  display: grid;
  grid-template-columns: var(--cols);
  width: max-content;
}
.hd {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(140%);
  border-block-end: 1px solid var(--stroke);
}
.corner {
  grid-column: 1;
  grid-row: 1 / span 2;
  position: sticky;
  inset-inline-start: 0;
  z-index: 1;
  display: flex;
  align-items: end;
  padding: 0 12px 8px;
  background: var(--glass-solid);
  border-inline-end: 1px solid var(--stroke);
  font-size: 12px;
  color: var(--ink3);
}
.hd-y {
  grid-row: 1;
  padding-block: 8px 0;
  border-inline-start: 2px solid var(--stroke);
}
.hd-y span {
  position: sticky;
  inset-inline-start: calc(var(--namew) + 10px);
  padding-inline: 10px;
  font: 700 14px/1.2 var(--f-head);
}
.hd-m {
  grid-row: 2;
  padding-block: 2px 8px;
  border-inline-start: 1px solid var(--stroke2);
  text-align: center;
  font-size: 12px;
  color: var(--ink2);
  white-space: nowrap;
}
.hd-m.jan {
  border-inline-start: 2px solid var(--stroke);
}
.hd-m.now {
  color: var(--ac);
  font-weight: 700;
}
.hd-m.now::after {
  content: "היום";
  display: block;
  font-size: 10px;
  font-weight: 600;
}
.grp {
  background: var(--surface);
  border-block-end: 1px solid var(--stroke2);
}
.grp > div {
  grid-column: 1 / -1;
}
.grp span {
  position: sticky;
  inset-inline-start: 0;
  display: inline-block;
  padding: 12px 12px 4px;
  font: 600 12px/1.2 var(--f-head);
  color: var(--ink3);
}
.row {
  /* auto: שם + תגיות לא נחתכים; הפסים נשארים בגובה נתיב (align-self ב-.bar) */
  grid-template-rows: repeat(var(--L, 1), minmax(var(--lane-h), auto));
  border-block-end: 1px solid var(--stroke2);
}
.nm {
  grid-column: 1;
  grid-row: 1 / -1;
  position: sticky;
  inset-inline-start: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  min-inline-size: 0;
  padding-inline: 12px 10px;
  background: var(--glass);
  backdrop-filter: blur(14px);
  border-inline-end: 1px solid var(--stroke);
}
.nm-btn {
  max-inline-size: 100%;
  padding: 0;
  border: 0;
  background: none;
  font: 600 14px/1.25 var(--f-head);
  text-align: start;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
/* רון 4.10: שם = הדגשת שורה, "פרטים" = הפאנל */
.nm-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-inline-size: 0;
}
.nm-open {
  flex: none;
  padding: 1px 8px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: none;
  color: var(--ink2);
  font: 600 11.5px/1.4 var(--f-body);
  cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
  .nm-open:hover {
    color: var(--ink);
    border-color: var(--ink3);
  }
}
.row.hl {
  position: relative;
}
.row.hl::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: color-mix(in oklab, var(--ac) 13%, transparent);
  box-shadow: inset 0 2px 0 var(--ac), inset 0 -2px 0 var(--ac);
  pointer-events: none;
}
.row.hl .nm {
  background: color-mix(in oklab, var(--ac) 22%, var(--glass-solid));
}
.row.hl .nm-btn {
  text-decoration: underline 2px var(--ac); /* צבע-טקסט רגיל: --ac על הרקע המודגש נופל מתחת ל-AA */
  text-underline-offset: 3px;
}
.nm-plain {
  font: 600 14px/1.25 var(--f-head);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row.inactive .nm-btn {
  color: var(--ink2);
}
.meta {
  max-inline-size: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink3);
}
.badge {
  min-inline-size: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.badge.info {
  background: var(--info-bg);
  color: var(--info-ink);
}
.badge.warn {
  background: var(--warn-bg);
  color: var(--warn-ink);
}
.badge.due {
  background: var(--due-bg);
  color: var(--due-ink);
}
/* רון 4.10: תג "הערה" = כפתור לפאנל, הטקסט בריחוף */
.badge.note {
  border: 0;
  background: var(--surface2);
  color: var(--ink2);
  font-family: inherit;
  cursor: pointer;
}
/* רון 4.10: כותרת קבוצת הארכיון = כפתור קיפול */
.grp-toggle {
  position: sticky;
  inset-inline-start: 0;
  padding: 12px 12px 4px;
  border: 0;
  background: none;
  font: 600 12px/1.2 var(--f-head);
  color: var(--ink3);
  cursor: pointer;
}
.grp-toggle::before {
  content: "▸ ";
}
.grp-toggle[aria-expanded="true"]::before {
  content: "▾ ";
}
.fld textarea {
  padding: 8px 10px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
  background: var(--surface2);
  color: var(--ink);
  font: inherit;
  resize: vertical;
}
.sr-only {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.act-btn {
  min-block-size: 22px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: var(--ac);
  color: var(--acInk);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.c {
  grid-row: 1 / -1;
  display: grid;
  place-items: center;
  border-inline-start: 1px solid var(--stroke2);
}
.c.jan {
  border-inline-start: 2px solid var(--stroke);
}
.c.now {
  background: var(--now-tint);
}
.c.pre {
  background: repeating-linear-gradient(135deg, var(--hatch) 0 2px, transparent 2px 8px);
}
/* עידן 4.10: אחרי סוף ההתמחות = קווקוו מודגש (חזק מ-.pre), אי אפשר לשבץ */
/* background-image (לא background) כדי לשמור את גוון עמודת "עכשיו"; בזמן גרירה הסמן נשאר "גרירה" */
.c.post {
  background-image: repeating-linear-gradient(135deg, color-mix(in oklab, var(--ink) 30%, transparent) 0 2px, transparent 2px 7px);
}
.board:not(.dragging) .c.post {
  cursor: not-allowed;
}
/* עידן 4.10: חודש בלי רוטציה = GA (בלי opacity על התא, כדי לא לעמעם את עמודת "עכשיו") */
.c.gen {
  color: var(--ink3, var(--ink2));
  font-size: 0.72rem;
  font-weight: 600;
}
.row.hc .c {
  font-size: 12px;
  color: var(--ink2);
}
.sw {
  display: inline-block;
  inline-size: 10px;
  block-size: 10px;
  border-radius: 3px;
  background: var(--c);
}
.bar {
  position: relative;
  z-index: 1;
  min-inline-size: 0;
  align-self: center;
  block-size: calc(var(--lane-h) - 10px);
  margin: 5px 3px;
  padding: 0 8px;
  border-radius: var(--radius-bar);
  border: 1.5px solid color-mix(in oklab, var(--c) 75%, transparent);
  background: color-mix(in oklab, var(--c) 30%, transparent);
  color: var(--ink);
  font: 500 12.5px/1 var(--f-body);
  text-align: start;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
}
.bar.plan {
  background: color-mix(in oklab, var(--c) 10%, transparent);
  border-style: dashed;
}
.bar.now {
  border-width: 2.5px;
  font-weight: 700;
}
/* NORA = שחור (החלטת עידן 29.9): פס מלא + טקסט לבן, קו-מתאר בהיר כדי שייראה גם בתצוגה כהה */
.bar.nora {
  border-color: var(--nora-edge);
}
.bar.nora:not(.plan) {
  background: var(--nora);
  color: var(--nora-ink);
}
.bar.abs {
  background-image: repeating-linear-gradient(135deg, var(--hatch) 0 2px, transparent 2px 8px);
}
.bar.abs.maternity {
  border-color: color-mix(in oklab, var(--maternity-ink) 55%, transparent);
  background-color: var(--maternity-bg);
  color: var(--maternity-ink);
}
.bar.abs.research {
  border-color: color-mix(in oklab, var(--research-ink) 55%, transparent);
  background-color: var(--research-bg);
  color: var(--research-ink);
}
/* רון 4.10: GA שסומן במפורש = פס אפור מלא (לא מקווקו: זה תכנון, לא היעדרות) */
.bar.gamark {
  border-color: color-mix(in oklab, var(--ink3) 70%, transparent);
  background: color-mix(in oklab, var(--ink3) 18%, transparent);
  color: var(--ink2);
  font-weight: 700;
}
.bar.abs.reserve {
  border-color: color-mix(in oklab, var(--reserve-ink) 55%, transparent);
  background-color: var(--reserve-bg);
  color: var(--reserve-ink);
}

/* ---- דיאלוג / פאנל-צד ---- */
dialog {
  inline-size: 100%;
  max-inline-size: 100%;
  max-block-size: 88dvh;
  margin: auto 0 0;
  padding: 0;
  overflow: auto;
  border: 1px solid var(--stroke);
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--sheet);
  color: var(--ink);
  font: 400 15px/1.5 var(--f-body);
  backdrop-filter: blur(24px) saturate(150%);
  box-shadow: 0 -12px 40px -16px var(--shadow);
}
dialog[open] {
  animation: rise 0.22s var(--ease-out);
}
dialog::backdrop {
  background: var(--scrim);
}
@media (min-width: 40rem) {
  dialog {
    inline-size: min(34rem, calc(100% - 32px));
    margin: auto;
    border-radius: var(--radius);
    box-shadow: 0 24px 60px -24px var(--shadow);
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.sheet {
  padding: 18px 18px max(18px, env(safe-area-inset-bottom));
}
.sh-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  margin-block-end: 12px;
}
.sh-head h2 {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
}
.sheet .sub {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--ink2);
}
.sheet .note {
  margin: 8px 0 0;
  font-size: 12.5px;
  color: var(--ink3);
}
.sheet .muted {
  color: var(--ink2);
  font-size: 13px;
}
.sheet h3 {
  margin-block: 16px 0;
  font-size: 14px;
  font-weight: 700;
}
.plist {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.plist li {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: color-mix(in oklab, var(--c, var(--r-ext)) 12%, transparent);
  font-size: 13.5px;
}
.plist li.editing {
  grid-template-columns: minmax(0, 1fr);
}
.pst {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink2);
}
/* רון 4.10: דרישה שהושלמה = קו חוצה ומעומעם */
.plist.reqs li.done .req-name,
.plist.reqs li.done .pst {
  text-decoration: line-through;
  color: var(--ink3);
}
.pst.now {
  color: var(--ac);
}
.inline {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
}
.tag {
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--surface2);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink2);
}
.fld {
  display: grid;
  gap: 4px;
  margin-block-start: 12px;
  min-inline-size: 0;
}
.fld label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink2);
}
.fld input,
.fld select {
  min-block-size: 40px;
  padding: 0 10px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
  background: var(--surface2);
  color: var(--ink);
  font: inherit;
}
.fld [aria-invalid="true"] {
  border-color: var(--danger);
}
.fld .err,
#dlg-err,
#rot-err {
  min-block-size: 1.2em;
  font-size: 12.5px;
  color: var(--danger);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: start;
  gap: 8px;
  margin-block-start: 16px;
}

/* ---- הקלדת DD/MM/YYYY (js/config.js Att.dateInputText, רון 4.10). העיצוב מ-.fld input ---- */
.att-dmy-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 4px;
  min-inline-size: 0;
}
.att-dmy {
  flex: 1;
  min-inline-size: 0;
  text-align: end; /* dir=ltr בתוך טופס RTL: הספרות צמודות לימין כמו שאר השדות */
}
.att-dmy::placeholder {
  color: var(--ink3); /* ברירת-המחדל האפורה נופלת מתחת ל-AA בערכה הכהה */
}
.att-dmy-cal {
  position: relative;
  display: flex;
  flex: none;
}
.att-dmy-btn {
  display: grid;
  place-items: center;
  min-inline-size: 40px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
  background: var(--surface2);
  color: var(--ink2);
  cursor: pointer;
}
input.att-dmy-pick {
  position: absolute;
  inset-inline-end: 0;
  bottom: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  border: 0;
  padding: 0;
}

/* ---- toast ---- */
.toast {
  position: fixed;
  inset-inline: 0;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 20;
  inline-size: fit-content;
  max-inline-size: calc(100% - 32px);
  margin-inline: auto;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  background: var(--toast-bg);
  color: var(--toast-ink);
  font-size: 14px;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
}
.toast.show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* ---- נגישות / מגע ---- */
@media (pointer: fine) {
  .meta .btn.sm {
    min-block-size: 22px;
  }
}
@media (pointer: coarse) {
  :root {
    --lane-h: 72px;
  }
  .btn,
  .act-btn,
  .nm-btn {
    min-block-size: 48px;
  }
  .act-btn {
    min-inline-size: 48px;
  }
  .nm-open {
    min-block-size: 40px;
    min-inline-size: 48px;
  }
  /* קטן בכוונה: לחיצה לידו פותחת את התא, ושם מופיעה אותה התראה */
  .month-flag {
    min-block-size: 28px;
    min-inline-size: 32px;
  }
}
@media (prefers-reduced-transparency: reduce) {
  .nm,
  .hd,
  dialog {
    background: var(--glass-solid);
    backdrop-filter: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .app *,
  dialog,
  .toast {
    transition-duration: 0.01ms !important;
  }
  dialog[open] {
    animation: fade 0.12s linear;
  }
  .toast {
    transform: none;
    transition: opacity 0.12s linear !important;
  }
  @keyframes fade {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }
}

/* התראת היעדרות בשיבוץ (עידן 8.11) */
.abs-warn {
  margin: 8px 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--warn-bg);
  color: var(--warn-ink);
  font-size: 14px;
  line-height: 1.45;
}
/* נשאר ברינדור (לא display:none) כדי שקורא מסך יכריז על האזהרה הראשונה */
.abs-warn:empty {
  margin: 0;
  padding: 0;
  background: none;
}
.month-flag.beside-stage {
  justify-self: start; /* תג השלב יושב בפינה השנייה */
}
.month-flag {
  z-index: 2;
  justify-self: end;
  align-self: start;
  margin: 3px;
  padding: 0 4px;
  border: 0;
  border-radius: 5px;
  background: var(--surface2);
  color: var(--warn-ink);
  font: 500 12.5px/1.3 var(--f-body);
  cursor: pointer;
}
