@font-face { font-family: Heebo; src: url(Heebo.ttf) format('truetype'); font-weight: 100 900; font-display: swap; }

:root {
  --ink: #1d3a6e;          /* דיו */
  --teal: #19ac8f;         /* הדגשה ראשית – הטורקיז של טובי */
  --teal-d: #12806a;
  --teal-l: #e3f5f0;
  --accent: #f5a03c;       /* הדגשה משנית */
  --bg: #f6f4ef;           /* משטח */
  --card: #ffffff;
  --line: #e3e0d8;
  --muted: #6b7690;
  --danger: #d9534f;
  /* צבעי פיצג'רלד */
  --c-p: #ffe27a; --c-a: #a9e08f; --c-f: #9fd0f5; --c-n: #ffc690; --c-s: #f7b5d0; --c-k: #d7efe9; --c-w: #ffffff;
  --r: 18px;
  --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { font-family: Heebo, 'Segoe UI', Arial, sans-serif; font-size: 17px; color: var(--ink); background: var(--bg); overflow: hidden; user-select: none; -webkit-user-select: none; }
input, textarea, select, button { font: inherit; color: inherit; }
input, textarea { user-select: text; -webkit-user-select: text; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }

.screen { position: fixed; inset: 0; display: flex; flex-direction: column; padding-top: var(--safe-t); }

/* כפתורים */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); background: var(--card); border-radius: 999px; padding: 11px 18px; cursor: pointer; font-weight: 600; min-height: 48px; transition: transform .1s, background .15s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); border-color: #f1c4c2; }
.btn.sm { padding: 8px 14px; min-height: 42px; font-size: 16px; }
.btn svg { width: 20px; height: 20px; }

/* מסך הילדים */
#scrProfiles { overflow-y: auto; padding: calc(var(--safe-t) + 28px) clamp(16px, 4vw, 48px) 32px; display: block; }
.phead { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand img { width: 58px; height: 58px; border-radius: 16px; }
.brand h1 { margin: 0; font-size: clamp(28px, 4vw, 38px); font-weight: 800; letter-spacing: -.5px; }
.brand p { margin: 2px 0 0; color: var(--muted); }
.phead-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.search { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1.5px solid var(--line); border-radius: 999px; padding: 0 18px; max-width: 420px; margin-bottom: 22px; }
.search input { border: 0; outline: 0; background: none; padding: 13px 0; width: 100%; font-size: 17px; }
.search svg { color: var(--muted); }
.kids { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.kid { background: var(--card); border-radius: 22px; padding: 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; cursor: pointer; border: 2px solid transparent; box-shadow: 0 2px 0 var(--line); transition: transform .12s, border-color .15s; position: relative; }
.kid:hover { border-color: var(--teal); }
.kid:active { transform: scale(.98); }
.kid .av { width: 108px; height: 108px; border-radius: 50%; background: var(--teal-l); display: grid; place-items: center; overflow: hidden; font-size: 44px; font-weight: 800; color: var(--teal-d); }
.kid .av img { width: 100%; height: 100%; object-fit: cover; }
.kid h3 { margin: 0; font-size: 22px; }
.kid small { color: var(--muted); }
.kid .more { position: absolute; top: 10px; left: 10px; border: 0; background: none; padding: 8px; border-radius: 50%; cursor: pointer; color: var(--muted); }
.kid .more:hover { background: var(--bg); }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); grid-column: 1/-1; }
.empty h2 { color: var(--ink); margin: 0 0 8px; }
.credit { color: var(--muted); font-size: 13px; margin-top: 40px; text-align: center; }

/* פס עליון של הלוח */
.topbar { display: flex; align-items: stretch; gap: 10px; padding: 10px; background: var(--ink); }
.nav { display: flex; gap: 8px; }
.tb { width: 64px; min-height: 64px; border-radius: 16px; border: 0; background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; cursor: pointer; position: relative; }
.tb svg { width: 30px; height: 30px; }
.tb:active { background: rgba(255,255,255,.25); }
.tb.speak { background: var(--teal); }
.tb.lock .ring { position: absolute; inset: 0; border-radius: 16px; background: conic-gradient(var(--accent) var(--p, 0%), transparent 0); opacity: .55; pointer-events: none; }
.strip { flex: 1; background: #fff; border-radius: 16px; display: flex; align-items: center; gap: 6px; padding: 6px 10px; overflow-x: auto; min-height: 64px; cursor: pointer; }
.strip:empty::before { content: 'המשפט יופיע כאן'; color: #b3b9c7; font-size: 18px; padding-inline-start: 6px; }
.chip { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 70px; height: 70px; border-radius: 12px; background: var(--chip, #fff); border: 1.5px solid rgba(0,0,0,.08); font-size: 13px; font-weight: 700; line-height: 1.1; text-align: center; padding: 3px; animation: pop .18s ease-out; }
.chip img { width: 42px; height: 42px; object-fit: contain; }
.chip.say { outline: 3px solid var(--accent); }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }

.editbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; background: #fff4e3; border-bottom: 2px solid var(--accent); }
.editbar strong { font-size: 18px; }
.editbar .hint { color: var(--muted); font-size: 15px; flex: 1; min-width: 200px; }
.eb-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crumb { padding: 8px 16px 0; font-weight: 700; font-size: 18px; color: var(--muted); min-height: 8px; }

/* הלוח */
.grid { flex: 1; display: grid; gap: var(--gap, 10px); padding: 10px 12px 12px; min-height: 0; grid-template-columns: repeat(var(--cols), 1fr); grid-template-rows: repeat(var(--rows), 1fr); }
.cell { position: relative; border-radius: var(--r); background: var(--bg-c, #fff); border: 2.5px solid rgba(29,58,110,.14); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 6px; cursor: pointer; min-height: 0; overflow: hidden; transition: transform .08s; }
.cell:active, .cell.hit { transform: scale(.95); }
.cell.hit { box-shadow: 0 0 0 4px var(--accent); }
.cell img { flex: 1; min-height: 0; width: 100%; object-fit: contain; pointer-events: none; }
.cell img.photo { object-fit: cover; border-radius: 12px; }
.cell .lbl { font-weight: 800; font-size: clamp(16px, calc(var(--fs, 3) * 1vmin), 40px); line-height: 1.1; text-align: center; padding-top: 4px; pointer-events: none; }
.cell.top { flex-direction: column-reverse; }
.cell.top .lbl { padding: 0 0 4px; }
.cell.noimg .lbl { font-size: clamp(22px, calc(var(--fs, 3) * 1.6vmin), 56px); }
.cell.folder { border-color: var(--teal); border-width: 3px; border-top-right-radius: 4px; }
.cell.folder::after { content: ''; position: absolute; top: 0; right: 0; width: 38%; height: 9px; background: var(--teal); border-bottom-left-radius: 8px; }
.cell.blank { background: transparent; border: 2.5px dashed transparent; cursor: default; }
.cell .mic { position: absolute; bottom: 6px; left: 6px; width: 22px; height: 22px; color: var(--ink); opacity: .55; }
body.editing .cell { animation: wig .35s ease-in-out infinite alternate; }
body.editing .cell.blank { border-color: #c9c4b8; cursor: pointer; animation: none; display: grid; place-items: center; color: #b5ae9f; }
body.editing .cell.blank svg { width: 40px; height: 40px; }
body.editing .cell:nth-child(2n) { animation-delay: -.17s; }
@keyframes wig { from { transform: rotate(-.6deg); } to { transform: rotate(.6deg); } }

/* חלון */
.modal { position: fixed; inset: 0; background: rgba(20,32,60,.45); display: grid; place-items: center; z-index: 50; padding: 16px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.sheet { background: var(--card); border-radius: 26px; width: min(640px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 24px; box-shadow: 0 20px 60px rgba(0,0,0,.25); animation: up .2s ease-out; }
@keyframes up { from { transform: translateY(24px); opacity: 0; } }
.sheet h2 { margin: 0 0 16px; font-size: 26px; }
.sheet h4 { margin: 18px 0 8px; font-size: 17px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 700; font-size: 16px; }
.field small { color: var(--muted); }
.field input[type=text], .field input[type=search], .field select { border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 14px; font-size: 18px; background: #fff; width: 100%; }
.field input:focus, .field select:focus { outline: 2px solid var(--teal); border-color: var(--teal); }
.preview { display: flex; gap: 16px; align-items: center; }
.pv-cell { width: 130px; height: 130px; flex: none; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.sw { width: 46px; height: 46px; border-radius: 12px; border: 2px solid rgba(0,0,0,.12); cursor: pointer; position: relative; }
.sw.on { outline: 3px solid var(--ink); outline-offset: 2px; }
.sw span { position: absolute; bottom: -20px; inset-inline: -14px; font-size: 12px; text-align: center; color: var(--muted); }
.swatches.labeled { row-gap: 26px; margin-bottom: 10px; }
.results { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-top: 10px; }
.res { border: 2px solid var(--line); border-radius: 14px; padding: 6px; background: #fff; cursor: pointer; aspect-ratio: 1; display: grid; place-items: center; }
.res:hover { border-color: var(--teal); }
.res img { width: 100%; height: 100%; object-fit: contain; }
.foot { display: flex; gap: 10px; justify-content: space-between; flex-wrap: wrap; margin-top: 22px; padding-top: 16px; border-top: 1.5px solid var(--line); }
.foot .row { gap: 8px; }
.list { display: flex; flex-direction: column; gap: 8px; }
.li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; }
.li:hover { border-color: var(--teal); }
.li b { flex: 1; }
.li small { color: var(--muted); }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.toggle input { width: 26px; height: 26px; accent-color: var(--teal); }
input[type=range] { accent-color: var(--teal); width: 100%; }
.rec { background: var(--danger); color: #fff; border-color: var(--danger); }
.note { background: var(--teal-l); border-radius: 14px; padding: 12px 14px; font-size: 15px; }
.loading { color: var(--muted); padding: 16px 0; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 22px; border-radius: 999px; z-index: 60; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.2); }

@media (max-width: 700px) {
  .tb { width: 48px; min-height: 52px; border-radius: 12px; }
  .tb svg { width: 24px; height: 24px; }
  .topbar { gap: 6px; padding: 8px; flex-wrap: wrap; }
  .strip { order: -1; flex-basis: 100%; min-height: 56px; }
  .topbar .nav:last-child { margin-inline-start: auto; }
  .chip { width: 56px; height: 56px; font-size: 11px; }
  .chip img { width: 32px; height: 32px; }
  .grid { gap: 6px; padding: 6px; }
  .cell { border-radius: 12px; padding: 4px; }
  .editbar .hint { display: none; }
  .sheet { padding: 18px; border-radius: 20px; }
}

/* המאגר */
.tb.lib.find { background: #fff; color: var(--ink); }
.tb.lib { width: auto; padding: 0 14px; gap: 6px; display: flex; align-items: center; background: var(--accent); font-weight: 800; font-size: 17px; }
.lib { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.libhead { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 14px 6px; }
.libhead h2 { margin: 0; font-size: 24px; }
.libhint { color: var(--teal-d); font-weight: 700; flex: 1; }
.libhead .search { margin: 0; flex: 1; min-width: 240px; max-width: 520px; margin-inline-start: auto; }
#libBody { flex: 1; overflow-y: auto; padding: 8px 12px 24px; display: grid; gap: 10px; align-content: start; }
#libBody.libcats { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); grid-auto-rows: 180px; }
#libBody.libgrid { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); grid-auto-rows: 140px; }
#libBody .cell { height: 100%; }
#libBody .cell .lbl { font-size: 17px; }
#libBody .libcat .lbl { font-size: 18px; }
#libBody .libcat small { color: var(--muted); font-weight: 600; }
.vtypes { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 700px) { .tb.lib span { display: none; } #libBody.libgrid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); grid-auto-rows: 116px; } #libBody.libcats { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); grid-auto-rows: 150px; } #libBody .cell .lbl { font-size: 14px; } }

/* רמות התחלה */
.levels { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.lv { border: 2px solid var(--line); background: #fff; border-radius: 18px; padding: 14px 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; text-align: center; }
.lv.on { border-color: var(--teal); background: var(--teal-l); }
.lv b { font-size: 18px; }
.lv small { color: var(--muted); font-size: 14px; line-height: 1.3; }
.mini { display: grid; grid-template-columns: repeat(var(--c), 1fr); grid-template-rows: repeat(var(--r), 1fr); gap: 3px; width: 64px; height: 46px; }
.mini i { background: var(--teal); border-radius: 3px; opacity: .75; }

/* מסך הנתונים */
.sheet.wide { width: min(920px, 100%); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; }
.stats div { background: var(--teal-l); border-radius: 16px; padding: 14px; text-align: center; }
.stats b { display: block; font-size: 32px; font-weight: 800; color: var(--teal-d); }
.stats span { font-size: 15px; color: var(--muted); }
.days { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding: 6px 0; overflow-x: auto; }
.days div { flex: 1; min-width: 30px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; }
.days i { width: 100%; background: var(--teal); border-radius: 6px 6px 2px 2px; min-height: 3px; }
.days small { font-size: 12px; color: var(--muted); }
.days em { font-style: normal; font-size: 13px; font-weight: 700; }
.topw { display: flex; flex-direction: column; gap: 6px; }
.topw div { display: grid; grid-template-columns: 130px 1fr 40px; align-items: center; gap: 10px; }
.topw span { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topw i { height: 18px; background: var(--accent); border-radius: 9px; }
.topw b { text-align: start; }
.logt { max-height: 320px; overflow-y: auto; border: 1.5px solid var(--line); border-radius: 14px; }
.logt table { width: 100%; border-collapse: collapse; font-size: 15px; }
.logt th { position: sticky; top: 0; background: var(--bg); text-align: start; padding: 8px 10px; }
.logt td { padding: 7px 10px; border-top: 1px solid var(--line); }
.btn[disabled] { opacity: .45; pointer-events: none; }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); } .topw div { grid-template-columns: 90px 1fr 32px; } }

/* טיפול */
.btn.live { background: var(--accent); border-color: var(--accent); color: #fff; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(245,160,60,.25); } }
.sumtxt { white-space: pre-wrap; font-family: inherit; font-size: 15px; background: var(--bg); border-radius: 14px; padding: 14px; max-height: 340px; overflow-y: auto; margin: 0; direction: rtl; }

/* קודם / אחר כך וסדר יום */
.tb.lib.tool1, .tb.lib.tool2 { background: rgba(255,255,255,.14); color: #fff; }
.tool { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.toolhead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px 4px; }
.toolhead h2 { margin: 0; font-size: 24px; margin-inline-end: 8px; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
#toolBody { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 14px 18px; }
.ftrow { display: grid; gap: 18px; align-items: stretch; }
.ftrow.n2 { grid-template-columns: 1fr 1fr; }
.ftrow.n3 { grid-template-columns: 1fr 1fr 1fr; }
.ftcard { position: relative; display: flex; flex-direction: column; border-radius: 24px; background: #fff; border: 3px solid var(--line); overflow: hidden; cursor: pointer; min-height: 300px; transition: transform .1s, opacity .2s; }
.ftcard.cur { border-color: var(--teal); box-shadow: 0 0 0 5px rgba(25,172,143,.18); }
.fthead { background: var(--ink); color: #fff; text-align: center; font-weight: 800; font-size: clamp(22px, 3.4vmin, 36px); padding: 10px; }
.ftcard.cur .fthead { background: var(--teal); }
.ftbody { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 14px; background: var(--bg-c); min-height: 0; }
.ftbody img { flex: 1; min-height: 0; width: 100%; max-height: 46vh; object-fit: contain; }
.ftbody img.photo { object-fit: cover; border-radius: 16px; }
.ftbody .lbl { font-weight: 800; font-size: clamp(22px, 3.6vmin, 40px); padding-top: 8px; text-align: center; }
.ftcard.empty .ftbody { border: 3px dashed #cfc9bc; margin: 14px; border-radius: 18px; color: #b5ae9f; gap: 6px; font-weight: 700; }
.ftcard.empty .ftbody svg { width: 46px; height: 46px; }
.ftcard.done, .scard.done { opacity: .45; }
.ftcard.hit, .scard.hit { transform: scale(.97); }
.chk { position: absolute; bottom: 12px; left: 12px; width: 54px; height: 54px; border-radius: 50%; border: 3px solid var(--teal); background: #fff; color: var(--teal); display: grid; place-items: center; cursor: pointer; }
.chk svg { width: 30px; height: 30px; stroke-width: 3; }
.done .chk { background: var(--teal); color: #fff; opacity: 1; }
.ftcard.done::after, .scard.done::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(-45deg, transparent 0 18px, rgba(255,255,255,.25) 18px 22px); pointer-events: none; }
.schedgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); grid-auto-rows: 210px; gap: 14px; align-content: start; }
.scard { position: relative; border-radius: 20px; background: var(--bg-c, #fff); border: 3px solid rgba(29,58,110,.14); display: flex; flex-direction: column; align-items: center; padding: 10px 10px 12px; cursor: pointer; overflow: hidden; }
.scard.cur { border-color: var(--teal); box-shadow: 0 0 0 5px rgba(25,172,143,.2); }
.scard img { flex: 1; min-height: 0; width: 100%; object-fit: contain; margin-top: 14px; }
.scard img.photo { object-fit: cover; border-radius: 12px; }
.scard .lbl { font-weight: 800; font-size: 20px; text-align: center; padding-top: 6px; }
.scard .num { position: absolute; top: 8px; right: 10px; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 800; }
.scard.cur .num { background: var(--teal); }
.scard .time { position: absolute; top: 10px; left: 10px; font-weight: 700; font-size: 15px; background: #fff; border-radius: 999px; padding: 2px 10px; }
.scard .chk { width: 44px; height: 44px; bottom: 8px; left: 8px; }
.scard .chk svg { width: 24px; height: 24px; }
.scard.add { background: transparent; border: 3px dashed #cfc9bc; color: #a8a192; justify-content: center; gap: 8px; font-weight: 700; }
.scard.add svg { width: 44px; height: 44px; }
.mini-ft { display: flex; gap: 4px; }
.mini-ft img, .mini-ft i { width: 40px; height: 40px; object-fit: contain; background: var(--bg); border-radius: 8px; }
@media (max-width: 700px) {
  .tb.lib.tool1 span, .tb.lib.tool2 span { display: none; }
  .ftrow.n3, .ftrow.n2 { grid-template-columns: 1fr; }
  .ftcard { min-height: 220px; }
  .schedgrid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); grid-auto-rows: 170px; }
}
.scard .chk { top: 8px; left: 8px; bottom: auto; width: 40px; height: 40px; }
.scard .time { left: 50%; transform: translateX(-50%); top: 12px; }
.scard img { margin-top: 26px; }
.tb.lib { padding: 0 10px; font-size: 15px; }
.tb.lib span { line-height: 1.1; }

/* קישור להורים */
.linkbox { background: var(--teal-l); border-radius: 14px; padding: 14px; font-size: 16px; word-break: break-all; user-select: text; -webkit-user-select: text; font-weight: 600; }
a.btn { text-decoration: none; }

/* טיימר חזותי */
.timerwrap { display: grid !important; grid-template-columns: minmax(0, 1.25fr) minmax(300px, 1fr); gap: 26px; align-items: center; }
.tdial { position: relative; width: min(100%, 64vh); aspect-ratio: 1; justify-self: center; }
.tsvg { width: 100%; height: 100%; display: block; overflow: visible; }
.tface { fill: #fff; stroke: #ece7dc; stroke-width: 3; filter: drop-shadow(0 10px 24px rgba(29,58,110,.12)); }
.tticks line { stroke: #c9c2b4; stroke-linecap: round; }
#tArc { transition: fill .3s; }
.tknob { fill: #fff; stroke: var(--ink); stroke-width: 5; }
.tdigits { position: absolute; left: 50%; bottom: 13%; transform: translateX(-50%); background: rgba(255,255,255,.92); border-radius: 999px; padding: 4px 20px; font-size: clamp(26px, 5vmin, 54px); font-weight: 800; font-variant-numeric: tabular-nums; direction: ltr; box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.tdial.fin .tsvg { animation: tpop .6s ease-out 3; }
@keyframes tpop { 50% { transform: scale(1.04); } }
.tstars { position: absolute; inset: 0; pointer-events: none; }
.tstars i { position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px; background: var(--tc); clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); animation: star 1.3s ease-out var(--d) forwards; opacity: 0; }
@keyframes star { 0% { opacity: 1; transform: rotate(var(--a)) translateY(0) scale(.4); } 100% { opacity: 0; transform: rotate(var(--a)) translateY(-52vmin) scale(1.3); } }
.tpanel { display: flex; flex-direction: column; gap: 16px; }
.tmain { display: flex; gap: 12px; }
.tbig { flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 22px; padding: 18px; font-size: 22px; font-weight: 800; cursor: pointer; color: #fff; background: var(--teal); }
.tbig svg { width: 30px; height: 30px; }
.tbig.play svg { fill: #fff; }
.tbig.pause { background: var(--accent); }
.tbig.reset { flex: .7; background: #fff; color: var(--ink); border: 2px solid var(--line); }
.tsec { display: flex; flex-direction: column; gap: 8px; }
.tsec > b { font-size: 17px; }
.tpresets { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.tp { border: 2px solid var(--line); background: #fff; border-radius: 16px; padding: 10px 0 6px; font-size: 24px; font-weight: 800; cursor: pointer; display: flex; flex-direction: column; align-items: center; line-height: 1; }
.tp small { font-size: 13px; font-weight: 600; color: var(--muted); margin-top: 2px; }
.tp.on { border-color: var(--teal); background: var(--teal-l); }
.tadj { display: flex; align-items: center; gap: 12px; }
.tadj .btn { width: 48px; justify-content: center; font-size: 24px; padding: 0; }
.tadj span { font-weight: 700; min-width: 90px; text-align: center; }
.tcolors { display: flex; gap: 10px; flex-wrap: wrap; }
.tcol { width: 46px; height: 46px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--line); cursor: pointer; }
.tcol.on { box-shadow: 0 0 0 3px var(--ink); }
.tnext { display: flex; align-items: center; gap: 12px; border: 2px dashed #cfc9bc; border-radius: 18px; padding: 10px 14px; cursor: pointer; min-height: 76px; color: var(--muted); font-weight: 700; }
.tnext img { width: 60px; height: 60px; object-fit: contain; }
.tnext span { flex: 1; color: var(--ink); font-size: 20px; }
.tnext svg { width: 26px; height: 26px; }
@media (max-width: 800px) { .timerwrap { grid-template-columns: 1fr; } .tdial { width: min(92vw, 46vh); } .tpresets { grid-template-columns: repeat(3, 1fr); } }
.tsvg { stroke: none; } .tticks line { stroke: #c9c2b4; } .tknob { stroke: var(--ink); }
.tdone { position: absolute; inset: 18%; border-radius: 50%; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; box-shadow: 0 0 0 8px var(--tc); animation: tin .5s ease-out; }
.tdone img { width: 55%; height: 55%; object-fit: contain; }
.tdone b { font-size: clamp(20px, 3.6vmin, 36px); }
@keyframes tin { from { transform: scale(.6); opacity: 0; } }

/* לוח אסימונים */
.tokwrap { position: relative; display: flex !important; flex-direction: column; align-items: center; gap: 22px; }
.tokgoal { display: flex; align-items: center; gap: 16px; background: #fff; border: 3px solid var(--line); border-radius: 24px; padding: 12px 22px; cursor: pointer; font-size: 20px; font-weight: 700; color: var(--muted); }
.tokgoal img { width: 84px; height: 84px; object-fit: contain; }
.tokgoal b { font-size: 28px; color: var(--ink); }
.tokgoal.won { border-color: #FFC53D; background: #FFF6D8; color: var(--ink); animation: tpop .6s ease-out 3; }
.tokq { width: 64px; height: 64px; border-radius: 50%; border: 3px dashed #cfc9bc; display: grid; place-items: center; color: #b5ae9f; }
.tokrow { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: clamp(8px, 1.6vw, 18px); width: 100%; max-width: 1100px; }
.slot { aspect-ratio: 1; border-radius: 28px; border: 4px dashed #cfc9bc; background: #fff; display: grid; place-items: center; cursor: pointer; padding: 10%; position: relative; transition: transform .12s; }
.slot em { font-style: normal; font-size: clamp(22px, 4vmin, 44px); font-weight: 800; color: #d6d0c4; }
.slot.next { border-color: var(--teal); border-style: solid; box-shadow: 0 0 0 6px rgba(25,172,143,.15); }
.slot.on { border-style: solid; border-color: #FFE08A; background: #FFFBEA; animation: tokin .45s cubic-bezier(.3,1.6,.5,1); }
.slot .tok, .slot img { width: 100%; height: 100%; object-fit: contain; }
.slot img { border-radius: 16px; }
.slot.prize { border: 4px solid #FFC53D; background: linear-gradient(160deg, #FFF6D8, #FFE7F0); filter: grayscale(.7); opacity: .7; }
.slot.prize.on { filter: none; opacity: 1; box-shadow: 0 0 0 8px rgba(255,197,61,.35); animation: tpop .6s ease-out 3; }
.slot:active { transform: scale(.94); }
@keyframes tokin { from { transform: scale(.3) rotate(-25deg); } }
.tokstars i { width: 34px; height: 34px; margin: -17px; }
.tokset { width: 100%; max-width: 1100px; display: grid; grid-template-columns: auto 1fr auto; gap: 22px; background: #fff4e3; border: 2px solid var(--accent); border-radius: 20px; padding: 14px 18px; align-items: start; }
.tokicons { display: flex; gap: 8px; flex-wrap: wrap; }
.ticon { width: 72px; border: 2px solid var(--line); background: #fff; border-radius: 16px; padding: 8px 4px 4px; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; }
.ticon .tok, .ticon img { width: 40px; height: 40px; object-fit: contain; }
.ticon small { font-size: 12px; color: var(--muted); }
.ticon.on { border-color: var(--teal); background: var(--teal-l); }
@media (max-width: 800px) { .tokrow { grid-template-columns: repeat(3, 1fr); max-width: 420px; } .tokset { grid-template-columns: 1fr; } .tokgoal b { font-size: 22px; } }

/* פס עליון בשתי שורות כשהמסך לא רחב: למעלה הכלים, למטה המשפט */
@media (max-width: 1400px) {
  .topbar { flex-wrap: wrap; row-gap: 8px; }
  .topbar .nav:first-child { flex: 1 1 100%; overflow-x: auto; scrollbar-width: none; }
  .topbar .nav:first-child::-webkit-scrollbar { display: none; }
  .topbar .nav:first-child .tb { flex: none; }
  .strip { flex: 1 1 0; min-width: 0; order: 2; }
  .topbar .nav:last-child { order: 3; }
}
@media (max-width: 700px) {
  .strip { order: 2; flex: 1 1 100%; }
  .topbar .nav:last-child { order: 3; margin-inline-start: auto; }
}
@media (max-width: 700px) {
  .topbar .nav:first-child { gap: 3px; justify-content: space-between; }
  .topbar .nav:first-child .tb, .topbar .nav:first-child .tb.lib { width: 36px; min-width: 36px; padding: 0; }
  .topbar .nav:first-child .tb svg { width: 22px; height: 22px; }
}

/* לוח בחירה */
.chwrap { display: flex !important; flex-direction: column; align-items: center; gap: 20px; padding-top: 26px !important; padding-inline: 28px !important; }
.chrow { display: grid; gap: clamp(14px, 3vw, 40px); width: 100%; max-width: 1200px; flex: 1; min-height: 0; align-items: stretch; }
.chrow.n2 { grid-template-columns: repeat(2, 1fr); max-width: 1000px; }
.chrow.n3 { grid-template-columns: repeat(3, 1fr); }
.chrow.n4 { grid-template-columns: repeat(4, 1fr); }
.chcard { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: var(--bg-c, #fff); border: 5px solid rgba(0,0,0,.08); border-radius: 32px; padding: 6%; min-height: 260px; max-height: 62vh; cursor: pointer; transition: transform .25s, opacity .25s, filter .25s, box-shadow .25s; font: inherit; }
.chcard img { width: 100%; flex: 1; min-height: 0; max-height: 40vh; object-fit: contain; }
.chcard img.photo { object-fit: cover; border-radius: 20px; }
.chcard .lbl { font-size: clamp(22px, 3.4vmin, 38px); font-weight: 800; color: var(--ink); }
.chcard.empty { background: #fff; border: 4px dashed #cfc9bc; color: #b5ae9f; }
.chcard.empty svg { width: 56px; height: 56px; }
.chcard:active { transform: scale(.96); }
.chside { position: absolute; top: 10px; inset-inline-start: 12px; background: var(--ink); color: #fff; font-size: 15px; font-weight: 700; border-radius: 999px; padding: 3px 12px; }
.chwrap.picked .chcard:not(.win) { opacity: .22; filter: grayscale(1); transform: scale(.9); }
.chwrap.picked .chcard.win { transform: scale(1.06); border-color: #FFC53D; box-shadow: 0 0 0 10px rgba(255,197,61,.35); z-index: 1; }
.chset { grid-template-columns: auto auto 1fr; }
@media (max-width: 800px) { .chrow.n3, .chrow.n4 { grid-template-columns: repeat(2, 1fr); } .chcard { min-height: 180px; } .chset { grid-template-columns: 1fr; } }

/* ניקוד לתיקון הגייה */
.nqrow { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.nqb { display: flex; flex-direction: column; align-items: center; min-width: 56px; padding: 6px 4px 4px; border: 2px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; font: inherit; }
.nqb b { font-size: 26px; line-height: 1.1; color: var(--ink); }
.nqb small { font-size: 12px; color: var(--muted); }
.nqb:active { background: #fff4e3; border-color: var(--accent); }
