/* ============================================================
   ניהול תקציב הבית — עיצוב
   ============================================================ */

:root {
  --ink: #0f172a;
  --ink-2: #334155;
  --ink-3: #64748b;
  --ink-4: #94a3b8;
  --line: #e2e8f0;
  --line-2: #f1f5f9;
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #fafbfc;

  --brand: #0d7d74;
  --brand-dark: #0a5f58;
  --brand-soft: #e6f4f2;
  --gold: #b45309;
  --gold-soft: #fef3e2;

  --pos: #15803d;
  --pos-soft: #e8f5ec;
  --neg: #be123c;
  --neg-soft: #fdeaef;
  --warn: #b45309;

  --r: 14px;
  --r-sm: 9px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px -12px rgba(15, 23, 42, .12);
  --shadow-lg: 0 2px 4px rgba(15, 23, 42, .04), 0 20px 44px -18px rgba(15, 23, 42, .22);
  --sans: 'Assistant', 'Segoe UI', 'Rubik', system-ui, -apple-system, 'Arial Hebrew', Arial, sans-serif;
  --nav-w: 252px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body { display: flex; min-height: 100vh; }

button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------------- ניווט ---------------- */
#nav {
  width: var(--nav-w); flex: 0 0 var(--nav-w);
  background: var(--surface);
  border-inline-start: 1px solid var(--line);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand {
  padding: 22px 20px 16px;
  border-bottom: 1px solid var(--line);
}
.brand h1 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.brand p { margin: 3px 0 0; font-size: 12.5px; color: var(--ink-3); }
.brand .bs { font-size: 11px; color: var(--ink-4); margin-bottom: 6px; }

.navgroup { padding: 14px 12px 4px; }
.navgroup > span {
  display: block; padding: 0 10px 7px;
  font-size: 11px; font-weight: 700; letter-spacing: .06em;
  color: var(--ink-4); text-transform: none;
}
.navlink {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; margin-bottom: 2px;
  border-radius: var(--r-sm); cursor: pointer;
  font-size: 14.5px; color: var(--ink-2);
  border: 0; background: none; width: 100%; text-align: start;
  transition: background .12s, color .12s;
}
.navlink:hover { background: var(--line-2); color: var(--ink); }
.navlink.on { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
.navlink .ic { width: 18px; text-align: center; opacity: .85; flex: 0 0 18px; }
.navlink .badge {
  margin-inline-start: auto; font-size: 11.5px; font-weight: 600;
  color: var(--ink-4); font-variant-numeric: tabular-nums;
}
.navlink.on .badge { color: var(--brand); }

.navfoot { margin-top: auto; padding: 14px 12px 18px; border-top: 1px solid var(--line); }
.navfoot .save { font-size: 12px; color: var(--ink-4); padding: 0 10px 8px; }

/* ---------------- אזור ראשי ---------------- */
#main { flex: 1; min-width: 0; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 30px 34px 90px; }

.pagehead { margin-bottom: 24px; }
.pagehead h2 { margin: 0; font-size: 27px; font-weight: 700; letter-spacing: -.02em; }
.pagehead p { margin: 6px 0 0; color: var(--ink-3); font-size: 14.5px; max-width: 74ch; }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow);
  margin-bottom: 20px; overflow: hidden;
}
.card > header {
  padding: 15px 20px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--surface-2);
}
.card > header h3 { margin: 0; font-size: 16px; font-weight: 700; }
.card > header .sub { font-size: 13px; color: var(--ink-3); }
.card > header .right { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; }
.card .body { padding: 18px 20px; }
.card .body.flush { padding: 0; }

/* ---------------- כפתורים ---------------- */
.btn {
  border: 1px solid var(--line); background: var(--surface);
  border-radius: var(--r-sm); padding: 7px 13px; cursor: pointer;
  font-size: 13.5px; font-weight: 600; color: var(--ink-2);
  transition: all .12s; white-space: nowrap;
}
.btn:hover { border-color: var(--ink-4); color: var(--ink); }
.btn.pri { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.pri:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn.sm { padding: 4px 9px; font-size: 12.5px; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--ink-3); }
.btn.ghost:hover { background: var(--line-2); }
.btn.danger:hover { color: var(--neg); border-color: var(--neg); }

.seg { display: inline-flex; background: var(--line-2); border-radius: var(--r-sm); padding: 3px; gap: 2px; }
.seg button {
  border: 0; background: none; padding: 5px 13px; border-radius: 6px;
  font-size: 13px; font-weight: 600; color: var(--ink-3); cursor: pointer;
}
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

/* ---------------- טבלאות ---------------- */
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th {
  text-align: start; font-size: 12.5px; font-weight: 700; color: var(--ink-3);
  padding: 9px 14px; border-bottom: 1px solid var(--line);
  background: var(--surface-2); white-space: nowrap; position: sticky; top: 0; z-index: 1;
}
table.t td { padding: 3px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr:hover td { background: #fcfdfe; }
table.t .num { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.t th.num { text-align: end; }
table.t tr.grp td {
  background: var(--line-2); font-weight: 700; font-size: 12.5px;
  color: var(--ink-2); padding: 7px 14px; letter-spacing: .01em;
}
table.t tr.tot td {
  background: var(--surface-2); font-weight: 700; border-top: 2px solid var(--line);
  border-bottom: 0; padding: 10px 14px;
}
table.t tr.sub td { color: var(--ink-3); font-size: 13.5px; }
td.lbl { width: 100%; }
td.act { width: 34px; }
.rowdel {
  border: 0; background: none; cursor: pointer; color: var(--ink-4);
  font-size: 16px; line-height: 1; padding: 2px 5px; border-radius: 5px; opacity: 0;
}
tr:hover .rowdel { opacity: 1; }
.rowdel:hover { color: var(--neg); background: var(--neg-soft); }

/* שדות בתוך טבלה */
.cell {
  border: 1px solid transparent; background: transparent;
  border-radius: 7px; padding: 6px 9px; width: 100%;
  transition: border-color .12s, background .12s;
}
.cell:hover { border-color: var(--line); }
.cell:focus { outline: 0; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px var(--brand-soft); }
.cell.n { text-align: end; font-variant-numeric: tabular-nums; width: 118px; }
.cell.n.filled { font-weight: 600; }
.cell.goal:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.cell.goal.filled { color: var(--gold); }
.cell.note { font-size: 13px; color: var(--ink-3); min-width: 130px; }
.cell.sel { width: auto; min-width: 108px; padding: 6px 7px; }
input[type=number].cell::-webkit-outer-spin-button,
input[type=number].cell::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number].cell { -moz-appearance: textfield; }

.addrow {
  padding: 9px 14px; border-top: 1px solid var(--line-2);
  background: var(--surface-2);
}

/* ---------------- לוח מחוונים ---------------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px 18px; box-shadow: var(--shadow);
}
.kpi .k { font-size: 12.5px; color: var(--ink-3); font-weight: 600; margin-bottom: 7px; }
.kpi .v { font-size: 27px; font-weight: 700; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.kpi .d { font-size: 12.5px; color: var(--ink-4); margin-top: 5px; font-variant-numeric: tabular-nums; }
.kpi.hero { background: linear-gradient(150deg, var(--brand) 0%, var(--brand-dark) 100%); border-color: transparent; }
.kpi.hero .k { color: rgba(255,255,255,.78); }
.kpi.hero .v { color: #fff; }
.kpi.hero .d { color: rgba(255,255,255,.7); }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.muted { color: var(--ink-4); }

.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px;
  border-radius: 99px; font-size: 12px; font-weight: 700;
}
.chip.pos { background: var(--pos-soft); color: var(--pos); }
.chip.neg { background: var(--neg-soft); color: var(--neg); }
.chip.gold { background: var(--gold-soft); color: var(--gold); }
.chip.gray { background: var(--line-2); color: var(--ink-3); }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 1000px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

/* פסי התקדמות / מבנה הוצאות */
.bars { display: flex; flex-direction: column; gap: 11px; }
.bar-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; }
.bar-row .bl { font-size: 13.5px; color: var(--ink-2); }
.bar-row .bv { font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bar-track { grid-column: 1 / -1; height: 8px; background: var(--line-2); border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 99px; transition: width .35s ease; }

.stack { display: flex; height: 34px; border-radius: 9px; overflow: hidden; border: 1px solid var(--line); }
.stack div { height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; font-size: 13px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ---------------- טופס ---------------- */
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-3); margin-bottom: 5px; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 8px 11px; background: var(--surface);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}
.hint { font-size: 12.5px; color: var(--ink-4); margin-top: 5px; }

.notice {
  background: var(--brand-soft); border: 1px solid #c5e5e1; color: var(--brand-dark);
  border-radius: var(--r-sm); padding: 11px 15px; font-size: 13.5px; margin-bottom: 18px;
}
.notice.gold { background: var(--gold-soft); border-color: #f5d9ac; color: #92400e; }

/* מסמכים */
.docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 8px; }
.doc {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer;
  font-size: 14px; transition: all .12s; background: var(--surface);
}
.doc:hover { border-color: var(--ink-4); }
.doc.on { background: var(--pos-soft); border-color: #b9dfc6; color: #14532d; }
.doc input { width: 17px; height: 17px; accent-color: var(--brand); cursor: pointer; flex: 0 0 auto; }

.linkgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 10px; }
.linkcard {
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px;
  display: block; color: inherit; background: var(--surface); transition: all .12s;
}
.linkcard:hover { border-color: var(--brand); box-shadow: var(--shadow); text-decoration: none; }
.linkcard b { display: block; font-size: 14px; color: var(--brand-dark); }
.linkcard span { font-size: 12.5px; color: var(--ink-3); }

/* ---------------- תקציב ---------------- */
.months { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 10px; }
.mtab {
  border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-sm);
  padding: 8px 14px; cursor: pointer; white-space: nowrap; font-size: 13.5px;
  display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 76px;
}
.mtab b { font-weight: 700; }
.mtab small { font-size: 11.5px; color: var(--ink-4); font-variant-numeric: tabular-nums; }
.mtab.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
.mtab.on small { color: var(--brand); }
.mtab.done::after { content: '✓'; position: absolute; }

table.yr { font-size: 13px; }
table.yr th, table.yr td { padding: 7px 9px; white-space: nowrap; }
table.yr td.lbl, table.yr th.lbl {
  text-align: start; width: 100%; position: sticky; inset-inline-start: 0;
  background: var(--surface); z-index: 2;
}
table.yr tr.grp td.lbl { background: var(--line-2); }
table.yr tr.tot td.lbl { background: var(--surface-2); }
.scrollx { overflow-x: auto; }

/* גרף */
.chart { width: 100%; display: block; }
.chart text { font-family: var(--sans); font-size: 11px; fill: var(--ink-3); }
.chart .axis { stroke: var(--line); stroke-width: 1; }
.chart .zero { stroke: var(--ink-4); stroke-width: 1; stroke-dasharray: 3 3; }

/* ---------------- שונות ---------------- */
.toast {
  position: fixed; inset-block-end: 22px; inset-inline-start: 22px; z-index: 99;
  background: var(--ink); color: #fff; padding: 11px 18px; border-radius: var(--r-sm);
  font-size: 14px; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(10px);
  transition: all .22s; pointer-events: none;
}
.toast.show { opacity: 1; transform: none; }

.empty { padding: 34px 20px; text-align: center; color: var(--ink-4); font-size: 14px; }
td.hint-c { white-space: nowrap; font-size: 12.5px; color: var(--ink-4); }

/* במכשירי מגע אין hover — כפתור המחיקה חייב להיות גלוי */
@media (hover: none) {
  .rowdel { opacity: .45; }
}

#navtoggle { display: none; }

@media (max-width: 860px) {
  body { flex-direction: column; }
  #nav {
    position: sticky; top: 0; z-index: 20; width: 100%; flex: none; height: auto;
    border-inline-start: 0; border-bottom: 1px solid var(--line);
  }
  #nav.collapsed .navgroup, #nav.collapsed .navfoot { display: none; }
  #nav.collapsed .brand { padding: 12px 16px; display: flex; align-items: center; gap: 12px; }
  #nav.collapsed .brand .bs, #nav.collapsed .brand p { display: none; }
  #nav.collapsed .brand h1 { font-size: 16px; }
  #nav.collapsed #navtoggle { margin: 0 auto 0 0; }
  #navtoggle { display: block; }
  .wrap { padding: 20px 14px 70px; }
  .cell.n { width: 88px; }
  /* טבלאות רחבות — גלילה אופקית בתוך הכרטיס במקום שבירת הפריסה */
  .card .body.flush { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .card .body.flush > div, .card .body.flush > table { min-width: 640px; }
  td.lbl .cell { min-width: 175px; }
  .pagehead h2 { font-size: 22px; }
  .kpi .v { font-size: 23px; }
}

@media print {
  #nav, .btn, .rowdel, .addrow, .seg { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; break-inside: avoid; }
  .wrap { max-width: none; padding: 0; }
}


/* ============================================================
   מסך טעינה
   ============================================================ */
.boot { display: flex; align-items: center; justify-content: center; height: 100vh; }
.spin {
  width: 18px; height: 18px; border-radius: 50%; display: inline-block;
  border: 2.5px solid var(--line); border-top-color: var(--brand);
  animation: sp .7s linear infinite; flex: 0 0 auto;
}
@keyframes sp { to { transform: rotate(360deg); } }

/* ============================================================
   מסך נחיתה והתחברות
   ============================================================ */
body.landing-mode { display: block; background: #fff; }
body.landing-mode #main { width: 100%; }

.landing {
  background:
    radial-gradient(1100px 520px at 78% -12%, #e6f4f2 0%, transparent 62%),
    radial-gradient(760px 420px at 12% 4%, #fef3e2 0%, transparent 55%),
    #ffffff;
  min-height: 100vh;
}
.lwrap { max-width: 940px; margin: 0 auto; padding: 52px 24px 60px; }

.lhero { text-align: center; padding: 18px 0 46px; }
.lhero .lbs { font-size: 12px; color: var(--ink-4); margin-bottom: 14px; }
.lmark { line-height: 0; margin-bottom: 14px; }
.lhero h1 {
  margin: 0; font-size: 52px; font-weight: 800; letter-spacing: -.035em;
  color: var(--brand-dark); line-height: 1.05;
}
.ltag { margin: 10px 0 0; font-size: 19px; font-weight: 600; color: var(--brand); }
.lblurb {
  margin: 16px auto 0; max-width: 46ch; font-size: 16px;
  color: var(--ink-2); line-height: 1.6;
}

.gbtn {
  margin: 30px auto 0; display: inline-flex; align-items: center; gap: 11px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 26px; font-size: 16px; font-weight: 700; color: var(--ink);
  cursor: pointer; box-shadow: var(--shadow); transition: all .15s;
}
.gbtn:hover:not(:disabled) { box-shadow: var(--shadow-lg); transform: translateY(-1px); border-color: var(--ink-4); }
.gbtn:active:not(:disabled) { transform: none; }
.gbtn:disabled { opacity: .65; cursor: default; }
.lnote { margin: 16px auto 0; max-width: 44ch; font-size: 13px; color: var(--ink-4); line-height: 1.6; }
.lerr {
  max-width: 46ch; margin: 22px auto 0; background: var(--neg-soft);
  border: 1px solid #f5c2ce; color: #9f1239;
  padding: 11px 16px; border-radius: var(--r-sm); font-size: 13.5px;
}

.lsteps {
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  padding: 32px 30px; box-shadow: var(--shadow); margin-bottom: 22px;
}
.lstepshead { text-align: center; margin-bottom: 26px; }
.lstepshead h2 { margin: 0; font-size: 25px; font-weight: 700; letter-spacing: -.02em; }
.lstepshead p { margin: 6px 0 0; color: var(--ink-3); font-size: 14.5px; }
.lsteps ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.lsteps li { display: flex; gap: 15px; align-items: flex-start; padding: 11px 6px; border-radius: 10px; }
.lsteps li:hover { background: var(--surface-2); }
.lsteps li .n {
  flex: 0 0 28px; height: 28px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand-dark);
  font-size: 13px; font-weight: 700; display: grid; place-items: center; margin-top: 1px;
}
.lsteps li b { display: block; font-size: 15px; margin-bottom: 2px; }
.lsteps li span { color: var(--ink-3); font-size: 13.5px; line-height: 1.5; }

.lfeat { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 14px; }
.lfeatcard {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 20px; box-shadow: var(--shadow);
}
.lfeatcard .fic { font-size: 20px; color: var(--brand); margin-bottom: 9px; line-height: 1; }
.lfeatcard b { display: block; font-size: 15px; margin-bottom: 5px; }
.lfeatcard span { color: var(--ink-3); font-size: 13.5px; line-height: 1.55; }

.lfoot {
  margin-top: 42px; padding-top: 22px; border-top: 1px solid var(--line);
  text-align: center; color: var(--ink-4); font-size: 12.5px;
}
.lfoot .dot { margin: 0 7px; }

@media (max-width: 620px) {
  .lwrap { padding: 34px 16px 44px; }
  .lhero h1 { font-size: 39px; }
  .ltag { font-size: 16.5px; }
  .lblurb { font-size: 15px; }
  .lsteps { padding: 24px 18px; border-radius: 14px; }
}

/* ============================================================
   כרטיס המשתמש ותגית השמירה
   ============================================================ */
.avat {
  width: 30px; height: 30px; border-radius: 50%; object-fit: cover;
  flex: 0 0 30px; background: var(--line-2); border: 1px solid var(--line);
}
.avat.ph { display: inline-block; }
.mecard {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px;
  border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line);
}
.mecard .mi { min-width: 0; }
.mecard .mi b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mecard .mi span { display: block; font-size: 11.5px; color: var(--ink-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.navfoot .save { display: flex; align-items: center; gap: 6px; }
.navfoot .save::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-4); flex: 0 0 7px; }
.navfoot .save.sv-ok::before { background: var(--pos); }
.navfoot .save.sv-wait::before { background: var(--gold); animation: pulse 1.3s ease-in-out infinite; }
.navfoot .save.sv-err::before { background: var(--neg); }
.navfoot .save.sv-err { color: var(--neg); font-weight: 600; }
@keyframes pulse { 50% { opacity: .3; } }


/* ============================================================
   סרטון ההדרכה
   ============================================================ */

/* קישור צפייה מתחת לכפתור ההתחברות */
.wlink {
  margin: 20px auto 0; display: inline-flex; align-items: center; gap: 8px;
  background: none; border: 0; cursor: pointer;
  color: var(--brand-dark); font-size: 14.5px; font-weight: 600;
  padding: 8px 14px; border-radius: 99px; transition: background .13s;
}
.wlink:hover { background: var(--brand-soft); }
.wlink svg { flex: 0 0 auto; }

/* כרטיס התצוגה המקדימה */
.lguide {
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  padding: 22px; box-shadow: var(--shadow); margin-bottom: 22px;
}
.vteaser { display: grid; grid-template-columns: 300px 1fr; gap: 22px; align-items: center; }
.vteaser.compact { grid-template-columns: 190px 1fr; gap: 16px; }

.vthumb {
  position: relative; padding: 0; border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden; cursor: pointer;
  background: var(--line-2); display: block; width: 100%; line-height: 0;
  transition: transform .16s, box-shadow .16s, border-color .16s;
}
.vthumb img { width: 100%; height: auto; display: block; }
.vthumb:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--brand); }
.vthumb:focus-visible { outline: 3px solid var(--brand-soft); outline-offset: 2px; }

.vplay {
  position: absolute; inset: 0; margin: auto;
  width: 54px; height: 54px; border-radius: 50%;
  background: rgba(255, 255, 255, .94); color: var(--brand-dark);
  display: grid; place-items: center;
  box-shadow: 0 4px 18px rgba(15, 23, 42, .3);
  transition: transform .16s, background .16s;
}
.vthumb:hover .vplay { transform: scale(1.08); background: #fff; }
.vplay svg { margin-inline-start: 3px; }

.vlen {
  position: absolute; inset-block-end: 8px; inset-inline-end: 8px;
  background: rgba(15, 23, 42, .82); color: #fff;
  font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 5px;
  line-height: 1.5;
}

.vmeta b { display: block; font-size: 17px; margin-bottom: 5px; }
.vmeta span { color: var(--ink-3); font-size: 14px; line-height: 1.55; }
.vteaser.compact .vmeta b { font-size: 15px; }
.vteaser.compact .vmeta span { font-size: 13.5px; }

/* נגן במסך מלא */
.vmodal {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(8, 15, 22, .88);
  display: grid; place-items: center; padding: 20px;
  animation: vfade .18s ease;
}
@keyframes vfade { from { opacity: 0; } }
.vbox {
  width: min(1120px, 100%); background: #0b1418;
  border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-lg);
}
.vhead {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 16px; color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.vhead b { font-size: 15px; font-weight: 700; }
.vclose {
  margin-inline-start: auto; background: none; border: 0; cursor: pointer;
  color: rgba(255, 255, 255, .75); font-size: 17px; line-height: 1;
  padding: 6px 10px; border-radius: 7px; transition: all .13s;
}
.vclose:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.vframe { position: relative; aspect-ratio: 16 / 9; background: #000; }
.vframe video, .vframe iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block;
}

@media (max-width: 720px) {
  .vteaser, .vteaser.compact { grid-template-columns: 1fr; gap: 14px; }
  .lguide { padding: 16px; border-radius: 14px; }
  .vmodal { padding: 0; place-items: center; }
  .vbox { border-radius: 0; width: 100%; }
}
