:root{
  --bg:#f6f3ec; --ink:#2b2b2b; --muted:#6b6b6b; --card:#ffffff;
  --want:#f4d9a8; --plan:#c9e4d6; --story:#d6d4f0; --accent:#7fb3a3;
  --accent-strong:#3f7d6b; /* ירוק כהה לכפתורים עם טקסט לבן: ניגודיות 4.8 */
  --speed:.18s;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{height:100%;margin:0}
html{font-size:17px;-webkit-text-size-adjust:100%}
/* באייפון: גודל הטקסט הבסיסי לפי ההגדרה של הטלפון (הגדרות > תצוגה > גודל טקסט) */
@supports (font: -apple-system-body){ html{font:-apple-system-body} }
body{
  background:var(--bg);color:var(--ink);
  font-family:system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
  -webkit-user-select:none;user-select:none;-webkit-touch-callout:none;
  touch-action:manipulation;overscroll-behavior:none;
}
input{-webkit-user-select:text;user-select:text}
button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer;touch-action:manipulation;-webkit-appearance:none;appearance:none}
#app{height:100%;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}

.screen{display:none;height:100%;flex-direction:column}
.screen.active{display:flex}

/* פתיחה */
#start{align-items:center;justify-content:center}
/* כל המסך הוא הכפתור: נגיעה בכל מקום מתחילה */
.start-btn{align-self:stretch;flex:1;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:20px;font-size:1.176rem;font-weight:600;color:var(--muted)}
.start-pic{width:min(78vw,52vh,340px);aspect-ratio:4/5;border-radius:36px;overflow:hidden;background:#fff;box-shadow:0 4px 16px #0000001a;display:block}
.start-pic img{width:100%;height:100%;object-fit:cover;display:block}
/* כפתור ברור להורה: "גע כדי להתחיל" (כל המסך עדיין לוחץ) */
.start-go{display:inline-flex;align-items:center;gap:10px;padding:14px 28px;border-radius:999px;background:var(--accent-strong);color:#fff;font-size:1.294rem;font-weight:700;box-shadow:0 3px 10px #0000001f}
.start-go span{font-size:.8em}

/* פס עליון */
.bar{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;min-height:64px}
.bar h1{font-size:1.176rem;margin:0 8px;flex:1;text-align:center;line-height:1.25}
/* אזור ההורה: גוררים את סמל ההגדרות ימינה עד הסוף (בקשת אבא 19.11) */
.unlock{position:relative;margin-inline-start:auto;width:min(62vw,280px);height:52px;border-radius:26px;background:#efece4;border:1px solid #d9d4c7;user-select:none;-webkit-user-select:none;touch-action:none;direction:ltr}
.unlock-text{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding-left:44px;font-size:.82rem;color:#6f6a5e;pointer-events:none;direction:rtl}
.unlock-knob{position:absolute;left:3px;top:3px;width:46px;height:46px;border-radius:50%;background:#fff;border:1px solid #cfc9bb;color:#6f6a5e;display:flex;align-items:center;justify-content:center}
.unlock-knob svg{width:28px;height:28px}
.unlock-knob.back{transition:transform .2s ease-out}
/* לקורא מסך בלבד: לא נראה במסך ואי אפשר לגעת בו באצבע */
.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;opacity:0}
@media (prefers-reduced-motion:reduce){.unlock-knob.back{transition:none}}
.calm .unlock-knob.back{transition:none}
.gear{width:52px;height:52px;color:#b9b4a8;position:relative;margin-inline-start:auto;/* פינה שמאלית: רחוק מהחץ לחזרה באזור ההורה */display:flex;align-items:center;justify-content:center}
.gear svg{width:30px;height:30px}
.dots{position:absolute;bottom:-4px;display:flex;gap:4px}
.dots i{width:6px;height:6px;border-radius:50%;background:#ddd8cc}
.dots i.on{background:var(--accent)}

/* בית */
.home-grid{flex:1;display:grid;gap:16px;padding:8px 16px 24px;grid-template-rows:repeat(3,1fr)}
.tile{border-radius:28px;display:flex;align-items:center;justify-content:center;gap:20px;font-size:clamp(1.529rem,7vw,2.353rem);font-weight:700;
  box-shadow:0 2px 0 #0000000f;transition:transform var(--speed),filter var(--speed)}
.tile .ico{font-size:1.5em}
.t-want{background:var(--want)} .t-plan{background:var(--plan)} .t-story{background:var(--story)}
.tile.lit{filter:brightness(1.07);transform:scale(1.02)}

/* לוח "אני רוצה" */
.spacer{width:56px}
.board{flex:1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:minmax(130px,1fr);gap:10px;padding:4px 12px 16px;min-height:0;overflow-y:auto}
.cell{background:var(--card);border-radius:20px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:6px;
  border:4px solid transparent;transition:border-color var(--speed),transform var(--speed);min-height:0}
.cell img{width:100%;flex:1;min-height:0;object-fit:contain;pointer-events:none}
.cell span{font-size:clamp(1.059rem,5vw,1.529rem);font-weight:700}
.cell.lit{border-color:var(--accent);transform:scale(1.04)}
/* השורה הקבועה: שש מילים קטנות, באותו מקום בכל נושא */
.core-row{flex:none;display:grid;grid-template-columns:repeat(6,1fr);gap:6px;padding:0 12px 8px}
.core-row[hidden]{display:none}
.cell.core{border-radius:14px;padding:4px 2px;border-width:3px;height:clamp(64px,11vh,96px)}
.cell.core span{font-size:clamp(0.941rem,4vw,1.176rem)}
.calm .cell.lit{transform:none}
/* טקסט גדול מאוד: שתי עמודות, כדי שיישאר מקום לתמונה */
.huge .board{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:minmax(190px,1fr)}
.huge .board .cell img{min-height:72px}
/* השורה הקבועה בטקסט גדול מאוד: שלוש בשורה, בשתי שורות */
.huge .core-row{grid-template-columns:repeat(3,1fr)}
.huge .cell.core{height:clamp(56px,9vh,80px);flex-direction:row;gap:6px}
.huge .cell.core img{width:auto;height:100%;flex:none;max-width:40%}

/* מסכים זמניים */
.soon{align-items:center;justify-content:center;text-align:center;font-size:1.647rem;position:relative}
.soon small{font-size:1.059rem;color:var(--muted)}
.back{width:56px;height:56px;font-size:1.882rem;border-radius:16px;background:var(--card)}
.soon .back{position:absolute;top:calc(12px + env(safe-area-inset-top));right:16px}

/* אזור הורה */
.settings{padding:8px 16px}
/* רשימת הנושאים באזור ההורה */
.ptopics{display:flex;flex-direction:column;gap:12px;padding:8px 0 24px}
.ptopics[hidden]{display:none}
.ptopic-btn{width:100%;min-height:72px;padding:14px 16px;border-radius:14px;background:var(--card);border:2px solid #e4dfd3;text-align:start;display:flex;flex-direction:column;gap:4px}
.ptopic-btn b{font-size:1.294rem}
.ptopic-btn small{font-size:.941rem;color:#6b665c}
.ptopic > :first-child{margin-top:8px}
.row{display:flex;align-items:center;justify-content:space-between;background:var(--card);border-radius:16px;padding:16px;font-size:1.176rem}
.row small{color:var(--muted);font-size:0.882rem}
.row input{width:28px;height:28px}
.note{color:var(--muted);font-size:0.941rem;margin-top:8px}
#parent{overflow-y:auto}
.settings h2{font-size:1.176rem;margin:24px 0 0}
.edit-list{display:flex;flex-direction:column;gap:8px;margin-top:8px}
.erow{display:flex;align-items:center;gap:10px;background:var(--card);border-radius:14px;padding:8px 10px}
.erow img{width:48px;height:48px;object-fit:contain}
.erow .name.small{font-size:1rem;font-weight:500}
.erow{flex-wrap:wrap}
.erow .ebtn:first-of-type{margin-inline-start:auto}
.erow .name{flex:1 1 calc(100% - 70px);min-width:0;font-size:1.176rem;font-weight:600}
.erow.off img,.erow.off .name{opacity:.3}
.ebtn{width:48px;height:48px;border-radius:12px;background:#efebe2;font-size:1.294rem;display:flex;align-items:center;justify-content:center}
.ebtn:disabled{opacity:.25}
.wide-btn{width:100%;min-height:52px;margin-top:12px;padding:14px 16px;border-radius:14px;background:var(--accent-strong);color:#fff;font-size:1.176rem;font-weight:700}
.wide-btn.secondary{background:var(--card);color:var(--ink);border:2px solid var(--accent)}
.link-btn{min-height:48px;margin:20px 0 8px;color:var(--muted);text-decoration:underline;font-size:0.941rem}
.picker{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:10px}
.picker button{background:var(--card);border-radius:14px;padding:8px;display:flex;flex-direction:column;align-items:center;font-size:1rem;font-weight:600}
.picker img{width:64px;height:64px;object-fit:contain}
.picker .empty{grid-column:1/-1;color:var(--muted);font-size:0.941rem}

/* הלוח שלי */
.plan-view{flex:1;display:flex;flex-direction:column;gap:12px;padding:4px 16px 16px;overflow-y:auto;min-height:0}
.ft-label{font-size:1.294rem;font-weight:700;color:var(--muted);margin:0}
.ft-card{flex:1;min-height:0;background:var(--card);border-radius:24px;border:5px solid transparent;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:10px;gap:6px}
.ft-card img{flex:1;min-height:0;width:100%;object-fit:contain}
.ft-card span{font-size:clamp(1.294rem,6vw,1.882rem);font-weight:700}
.ft-card.now{border-color:var(--accent)}
.ft-card.next{opacity:.55}
.strip{flex:1;min-height:0;display:flex;flex-direction:column;gap:10px;overflow-y:auto}
.pcard{flex:none;display:flex;align-items:center;gap:14px;background:var(--card);border-radius:20px;padding:8px 14px;border:4px solid transparent}
.pcard img{width:64px;height:64px;object-fit:contain}
.pcard span{flex:1;font-size:1.294rem;font-weight:700;text-align:start}
.pcard.wait{opacity:.75}
.pcard.now{flex:1 1 0;min-height:0;flex-direction:column;justify-content:center;border-color:var(--accent);padding:12px}
.pcard.now img{flex:1;min-height:0;width:100%;max-height:42vh}
.pcard.now span{flex:none;text-align:center;font-size:clamp(1.294rem,6vw,1.882rem)}
/* "קודם ואחר כך": שני הכרטיסים תמיד על המסך. התמונה של עכשיו מתכווצת, השם והכרטיס "אחר כך" לא נחתכים */
.strip.ft{overflow:hidden}
.strip.ft .pcard.wait{flex:none}
/* "כל היום": הרשימה נגללת, והכרטיס של עכשיו בגובה קבוע */
.strip:not(.ft) .pcard.now{flex:none}
.strip:not(.ft) .pcard.now img{flex:none;height:28vh}
.pcard.fly{transition:transform .5s ease,opacity .5s ease;pointer-events:none}
.pocket{display:flex;align-items:center;gap:12px;background:#efe6d6;border:2px dashed #b9a47f;border-radius:20px;padding:8px 14px;min-height:64px;color:var(--ink)}
.pocket .lbl{font-size:1.176rem;font-weight:700}
.pocket .got{flex:1;display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.pocket .got img{width:40px;height:40px;object-fit:contain;background:var(--card);border-radius:8px;padding:2px}
.pocket .more{font-weight:700}
.done-btn{padding:18px;border-radius:20px;background:var(--accent-strong);color:#fff;font-size:1.529rem;font-weight:700}
.day-item{display:flex;align-items:center;gap:14px;background:var(--card);border-radius:20px;padding:10px 14px;border:5px solid transparent}
.day-item img{width:84px;height:84px;object-fit:contain}
.day-item span{flex:1;font-size:1.412rem;font-weight:700}
.day-item.now{border-color:var(--accent)}
.day-item.done{opacity:.35}
.day-item .check{font-size:1.765rem;width:40px;text-align:center}
.all-done{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:1.882rem;font-weight:700;gap:10px}
.all-done .star{font-size:5.294rem}
button.all-done{flex:0 0 auto;padding:8px 0;color:var(--ink)}
button.all-done .star{font-size:3.5rem}
/* הפרסים לא מתכווצים מתחת לגובה שלהם: בטקסט גדול המסך נגלל, ושום דבר לא עולה על הכותרת או על הכיס */
.rewards{flex:1 0 auto;display:grid;grid-template-columns:repeat(auto-fit,minmax(96px,1fr));gap:10px;align-content:center}
.reward{background:var(--card);border-radius:20px;border:4px solid transparent;padding:10px 6px;display:flex;flex-direction:column;align-items:center;gap:6px;transition:opacity var(--speed)}
.reward img{width:100%;max-width:120px;max-height:min(120px,16vh);aspect-ratio:1;object-fit:contain}
/* מסך נמוך (אייפון SE): כוכב קטן יותר, כדי שיישאר מקום לפרסים */
@media (max-height:700px){button.all-done .star{font-size:2.5rem}.reward img{max-height:13vh}}
/* "סיימנו! מה עכשיו?" נשאר בשורה אחת גם בטקסט גדול מאוד */
button.all-done{font-size:min(1.882rem,8vw)}
.reward span{font-size:1.176rem;font-weight:700}
.reward.picked{border-color:var(--accent)}
.reward.dim{opacity:.35}
.seg{display:flex;gap:8px;margin-top:10px}
.seg-btn{flex:1;padding:14px;border-radius:14px;background:var(--card);font-size:1.059rem;font-weight:600;border:3px solid transparent}
.seg-btn.on{border-color:var(--accent-strong)}
.seg{flex-wrap:wrap}
.tones .seg-btn{display:flex;align-items:center;justify-content:center;min-width:52px;min-height:52px;padding:8px}
.tones i{display:block;width:30px;height:30px;border-radius:50%;border:1px solid #0003}
.sym-grid{max-height:40vh;overflow-y:auto;width:100%;grid-template-columns:repeat(4,1fr)}
.sym-grid img{width:56px;height:56px}
.photo-pick{grid-column:1/-1;flex-direction:row!important;justify-content:center;gap:8px;min-height:52px;border:2px solid var(--accent-strong)}
select.se-input{margin-top:10px;-webkit-appearance:menulist;appearance:auto}
#picNow{width:110px;height:110px;object-fit:contain}
.erow .ebtn.x{font-size:1.176rem}

/* סיפורים */
.story-lib{flex:1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:max-content;gap:12px;padding:4px 16px 16px;overflow-y:auto;min-height:0}
.cover{min-height:170px;background:var(--card);border-radius:22px;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:10px;gap:8px}
.cover img{width:100%;height:110px;object-fit:contain}
.cover{border:4px solid transparent;transition:border-color var(--speed)}
.cover.lit{border-color:var(--accent)}
.cover span{font-size:1.176rem;font-weight:700;text-align:center}
.reader{flex:1;display:flex;flex-direction:column;padding:4px 16px 16px;gap:12px;min-height:0}
.page-card{flex:1;min-height:0;background:var(--card);border-radius:26px;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:16px;gap:12px}
.page-card img{flex:1;min-height:0;width:100%;object-fit:contain}
.page-card p{font-size:clamp(1.412rem,6.5vw,2rem);font-weight:700;text-align:center;margin:0;line-height:1.35}
.page-nav{display:flex;align-items:center;justify-content:space-between;gap:12px}
.nav-btn{width:96px;height:80px;border-radius:22px;background:var(--accent-strong);color:#fff;font-size:2.353rem;font-weight:700}
.nav-btn:disabled{opacity:.2}
.page-num{font-size:1.176rem;color:var(--muted)}
.story-box{max-height:92vh;overflow-y:auto}
.se-input{width:100%;font:inherit;font-size:1.176rem;padding:12px;border-radius:12px;border:2px solid #ddd8cc;background:#fff}
.se-pages{display:flex;flex-direction:column;gap:10px;width:100%}
.se-page{background:var(--card);border-radius:14px;padding:10px;display:flex;flex-direction:column;gap:8px}
.se-page .top{display:flex;align-items:center;gap:8px}
.se-page .sym{width:64px;height:64px;border-radius:12px;background:#efebe2;display:flex;align-items:center;justify-content:center;font-size:0.824rem;color:var(--muted)}
.se-page .sym img{width:60px;height:60px;object-fit:contain}
.se-page .num{flex:1;font-weight:700;color:var(--muted)}

/* עמודי טקסט */
.text-page{flex:1;overflow-y:auto;padding:4px 20px 24px;font-size:1.118rem;line-height:1.6}
.text-page h2{font-size:1.176rem;margin:18px 0 4px}
.text-page p{margin:8px 0}
.text-page .ltr{text-align:left;font-size:0.882rem;color:var(--muted);word-break:break-all;-webkit-user-select:text;user-select:text}
#about,#credits{overflow:hidden}

/* הקלטה */
.erow .tag{font-size:0.765rem;color:#a05a00;background:#fbe9cf;border-radius:8px;padding:2px 6px;margin-inline-start:6px}
.erow .tag.mine{color:#2d6b3a;background:#d9f2dd}
.rec-panel{position:fixed;inset:0;background:#0006;display:flex;align-items:center;justify-content:center;z-index:10;padding:16px}
.rec-panel[hidden]{display:none}
#recPanel{z-index:11}
.rec-box{background:var(--bg);border-radius:24px;padding:20px;width:100%;max-width:380px;max-height:100%;overflow-y:auto;display:flex;flex-direction:column;align-items:center;gap:10px}
.rec-box>*{flex-shrink:0}
.rec-box img{width:110px;height:110px;object-fit:contain}
.rec-label{font-size:1.529rem;font-weight:700}
.rec-hint{color:var(--muted);font-size:0.941rem;text-align:center;margin:0}
.rec-btn{width:96px;height:96px;border-radius:50%;background:#fff;border:4px solid #d9534f;display:flex;align-items:center;justify-content:center}
.rec-btn span{width:56px;height:56px;border-radius:50%;background:#d9534f;transition:border-radius var(--speed)}
.rec-btn.on span{border-radius:10px;width:40px;height:40px}
.rec-row{display:flex;gap:10px;width:100%}
.ebtn.wide{flex:1;width:auto;font-size:1.059rem;font-weight:600}
.ebtn.good{background:var(--accent-strong);color:#fff}
.rec-box .wide-btn{margin-top:4px}

/* מצב רגוע, וכיבוד ההגדרה של המכשיר */
.calm *{transition:none!important;animation:none!important}
.calm .tile.lit{transform:none}
@media (prefers-reduced-motion: reduce){
  *{transition:none!important;animation:none!important}
  .tile.lit,.cell.lit{transform:none}
}

.picker button.on{outline:4px solid var(--accent);outline-offset:-4px}
.part-tabs{display:flex;gap:6px;flex:none}
.part-tab{flex:1;padding:10px 4px;border-radius:14px;background:var(--card);border:2px solid transparent;font-size:1rem;font-weight:700;color:var(--muted)}
.part-tab.on{border-color:var(--accent);color:var(--ink)}
.time-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:8px 0}
.time-row input{font-size:1.1rem;padding:6px 8px;border-radius:10px;border:1px solid #ccc;background:var(--card);color:var(--ink)}

/* עורך לוח שההורה יצר */
.board-box{align-items:stretch}
.board-box .be-label,.board-box .be-h{font-size:1.176rem;font-weight:700;margin:6px 0 0}
.board-box .erow img{width:48px;height:48px}
.board-box .picker img{width:56px;height:56px}
.board-box .picker button:disabled{opacity:.35}

/* עיצוב 20.11.2026 (השראה: AutiSpark, בצבעים רגועים): צבע אחד לכל כלי, כרטיסים לבנים מעוגלים, גופן מעוגל */
:root{--want-soft:#fbefdc;--plan-soft:#e6f3ec;--story-soft:#ecebf8;--shadow:0 3px 10px #3a32200f,0 1px 2px #3a32200d}
body{font-family:ui-rounded,"SF Pro Rounded",system-ui,-apple-system,"Segoe UI",Arial,sans-serif}
#want{background:var(--want-soft)} #plan{background:var(--plan-soft)} #story,#reader{background:var(--story-soft)}
.tile{border-radius:32px;justify-content:flex-start;padding-inline:24px;box-shadow:var(--shadow)}
.tile .ico{flex:none;width:1.9em;height:1.9em;border-radius:50%;background:#fff;display:flex;align-items:center;justify-content:center;font-size:1.3em;box-shadow:var(--shadow)}
.cell,.pcard,.back,.row,.ptopic-btn,.seg-btn,.part-tab,.picker button{box-shadow:var(--shadow)}
.cell{border-radius:24px}
.cell.core{border-radius:16px}
.pcard{border-radius:24px}
.ptopic-btn{border-radius:18px}
/* באייפון עם "גבה": גם הפסים ליד השוליים בצבע של המסך */
body:has(#want.active){background:var(--want-soft)} body:has(#plan.active){background:var(--plan-soft)} body:has(#story.active),body:has(#reader.active){background:var(--story-soft)}
