*{box-sizing:border-box}html,body{margin:0;max-width:100%;overflow-x:hidden}body{font-family:Arimo,Arial,sans-serif;color:#111d31;background:#fff;direction:rtl}button{font-family:inherit;cursor:pointer}button:disabled{opacity:.5;cursor:default}.page{max-width:580px;margin:auto;padding:7px 7px 26px}.topbar{text-align:center;margin-bottom:8px}h1{font-size:27px;line-height:1.2;font-weight:700;margin:0 0 8px}.subtitle{color:#7c8ea1;font-size:12px;margin-bottom:8px}.difficulty-switch{display:flex;gap:4px;justify-content:center;flex-wrap:wrap}.difficulty-btn{height:32px;padding:0 12px;border:1px solid #dbe4ef;border-radius:9px;background:white;color:#61758e;font-size:12px;font-weight:700}.difficulty-btn.active{background:#197cef;border-color:#197cef;color:#fff}.game-card{border:1px solid #e1e8f1;box-shadow:0 7px 23px rgba(30,64,108,.075);border-radius:17px;background:white;padding:8px}.top-actions{display:flex;justify-content:center;gap:7px;margin:2px 0 9px}.new-btn,.restart-btn{border-radius:10px;height:37px;padding:0 15px;border:1px solid #d6e3f2;font-size:13px;font-weight:700}.new-btn{background:#197cef;color:white;border-color:#197cef}.restart-btn{background:#f7faff;color:#3d6089}.board{direction:ltr;display:grid;grid-template-columns:repeat(9,minmax(0,1fr));width:min(100%,450px);aspect-ratio:1/1;margin:0 auto;border:2px solid #131e2b;box-shadow:0 2px 7px #aaa;user-select:none;-webkit-user-select:none}.cell{position:relative;border:0;border-right:1px solid #738293;border-bottom:1px solid #738293;background:white;color:#156cde;display:flex;align-items:center;justify-content:center;padding:0;font-size:clamp(16px,4.5vw,25px);font-weight:600;min-width:0;min-height:0;aspect-ratio:1/1}.cell:nth-child(9n){border-right:0}.cell:nth-child(n+73){border-bottom:0}.cell[data-col="2"],.cell[data-col="5"]{border-right:2px solid #172132}.cell[data-row="2"],.cell[data-row="5"]{border-bottom:2px solid #172132}.cell.given{color:#15191e;font-weight:800}.cell.selected{background:#bbdffb}.cell.peer{background:#f2f7fd}.cell.same{background:#dbeeff}.cell.conflict{color:#d52938;background:#ffe7e9}.cell.hinted{color:#1c9a54}.notes{position:absolute;inset:0;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);font-size:clamp(7px,1.8vw,11px);color:#637792;line-height:1}.notes span{display:flex;align-items:center;justify-content:center}.numpad{direction:ltr;max-width:450px;margin:8px auto 0;display:grid;grid-template-columns:repeat(9,minmax(0,1fr));gap:5px}.num-btn{aspect-ratio:1;border:1px solid #cfdced;border-radius:10px;background:linear-gradient(#fff,#edf5fe);color:#1473e6;font-size:clamp(18px,5vw,25px);font-weight:800;touch-action:none;user-select:none}.num-btn:active{background:#cae5ff}.numpad.notes-mode .num-btn{font-size:19px;color:#5f7798}.numpad.notes-mode .num-btn.noted{background:#197cef;color:#fff}.timer{text-align:center;color:#56708f;font-weight:700;margin:7px 0;font-size:17px;direction:ltr}.controls{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:8px;margin:6px auto}.control-btn,.errors-label{height:35px;border:1px solid #dce5ef;background:white;color:#44607f;border-radius:10px;padding:0 10px;font-size:12px;font-weight:700;display:inline-flex;align-items:center;gap:5px}.errors-label input{margin:0 0 0 4px}.control-btn.on{border-color:#197cef;background:#edf6ff}.actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;max-width:450px;margin:9px auto 0}.action{border:0;border-radius:9px;color:#fff;font-weight:700;font-size:11px;padding:0 4px;height:37px}.check{background:#20aa6a}.hint{background:#f0a818}.solution{background:#8a5cd6}.print{background:#4a6fa5}.message{max-width:450px;margin:7px auto 0;padding:8px;border-radius:8px;background:#f4f8fc;text-align:center;color:#4d6580;font-size:12px;display:none}.message.show{display:block}.message.bad{background:#fff0f0;color:#a53232}.message.good{background:#edfff1;color:#178047}.seo{max-width:560px;padding:8px 12px;margin:20px auto 0;font-size:14px;color:#53657c;line-height:1.8;text-align:center}.seo h2{font-size:18px;color:#1d3350;margin:12px 0 6px}.seo h3{font-size:16px;color:#1d3350;margin:12px 0 5px}.seo a{color:#197cef}.iframe-mode .seo,.iframe-mode .site-top{display:none!important}.iframe-mode .page{padding-top:3px}.overlay{position:fixed;inset:0;background:#202d3b88;z-index:50;display:none;align-items:center;justify-content:center;padding:14px}.overlay.show{display:flex}.modal{position:relative;text-align:center;background:white;width:min(94vw,410px);max-height:90vh;overflow:auto;border-radius:23px;padding:26px 20px;box-shadow:0 15px 55px #1115}.modal h2{margin:0 0 10px;font-size:26px}.modal p{line-height:1.7;font-size:14px;color:#51687f}.modal .close{position:absolute;left:12px;top:10px;border:0;background:#f1f3f6;border-radius:50%;width:32px;height:32px;font-size:22px}.modal .big{color:#32a856;font-size:35px}.modal-buttons{display:flex;justify-content:center;gap:10px;margin-top:15px;flex-wrap:wrap}.modal-buttons button{border:0;border-radius:10px;background:#197cef;color:white;padding:11px 16px;font-weight:700}@media(max-width:520px){.page{padding:4px 3px 18px}h1{font-size:23px}.game-card{padding:4px}.difficulty-btn{height:30px;padding:0 9px;font-size:11px}.board{width:100%}.numpad{gap:3px}.top-actions{margin-bottom:6px}.new-btn,.restart-btn{height:35px}.actions{gap:4px}.action{font-size:10px}.cell{font-size:clamp(17px,5.3vw,23px)}}@media print{.top-actions,.difficulty-switch,.numpad,.timer,.controls,.actions,.message,.seo,.site-top,.overlay,.subtitle{display:none!important}.page{max-width:100%;padding:0}.game-card{border:0;box-shadow:none}.board{width:160mm;height:160mm;box-shadow:none}.cell{font-size:24px}.cell:not(.given){color:transparent!important}.cell .notes{display:none}h1{margin-bottom:18px}}

/* גרסה 2 — תפריט רמות, משחק חדש, שורת כלים חדשה ותצוגת הטמעה */
.topbar{margin-bottom:9px}
.difficulty-switch{display:flex;align-items:center;gap:5px;flex-wrap:wrap;justify-content:center}
.difficulty-switch .new-btn{height:33px;font-size:12px;padding:0 11px;white-space:nowrap;margin-right:5px}
.new-btn,.restart-btn{border-radius:9px;border:1px solid #d6e3f2;font-weight:700}
.new-btn{color:#fff;background:#197cef;border-color:#197cef}
.restart-btn{height:36px;background:#f7faff;color:#3d6089;padding:0 13px;font-size:12px}
.controls{margin:8px auto 5px}
.secondary-actions{display:flex;justify-content:center;align-items:center;gap:8px;margin:9px auto 0}
.info-bottom{height:36px;font-size:12px}
.timer{margin:8px auto 2px;font-size:14px;color:#718297}
.desktop-chrome{display:none;height:120px;overflow:hidden;text-align:center}
.desktop-chrome iframe{display:block;width:1350px;max-width:100%;height:120px;border:0;margin:auto}
.desktop-side-ads{display:none;position:relative;width:min(580px,100%);height:0;margin:0 auto;z-index:0}
.desktop-side-ads .side-ad{position:absolute;top:30px;width:160px;height:600px;overflow:hidden}
.desktop-side-ads .side-ad.left{left:-178px}
.desktop-side-ads .side-ad.right{right:-178px}
@media(min-width:901px){.standalone-mode .desktop-chrome{display:block}}
@media(min-width:1200px){.standalone-mode .desktop-side-ads{display:block}}
@media(max-width:520px){
 .topbar{margin-bottom:5px}
 .difficulty-switch{gap:3px}
 .difficulty-btn{font-size:10px;padding:0 8px;height:29px}
 .difficulty-switch .new-btn{height:29px;font-size:10px;margin-right:1px;padding:0 8px}
 .secondary-actions{margin-top:7px;gap:6px}
 .timer{margin:6px 0 1px}
}
@media print{.desktop-chrome,.desktop-side-ads,.secondary-actions{display:none!important}}


/* גרסה 3 — התאמות רווחים, כפתורים והטמעה */
/* 5 פיקסלים נוספים בין שורת רמות הקושי לתחילת כרטיס המשחק */
.topbar{margin-bottom:14px}
/* משחק חדש בגודל דומה לרמות, עם ירוק עדין וללא אייקון */
.difficulty-switch .new-btn{height:32px;padding:0 11px;font-size:12px;font-weight:700;margin-right:4px;line-height:1;background:#bcecc0;color:#205b33;border:1px solid #91d69c;border-radius:9px;box-shadow:none}
.difficulty-switch .new-btn:hover{background:#a7e4ae}
/* ריווח המספרים: תוספת 4 פיקסלים מלמעלה ומלמטה */
.numpad{margin-top:12px;margin-bottom:4px}
/* כפתורי העזר נשארים בשורה נפרדת ובמרכז */
.secondary-actions{width:100%;display:flex;justify-content:center;align-items:center;gap:8px;margin-left:auto;margin-right:auto}
/* תפריט האתר אינו מופיע בשום עמוד בנייד, כולל עמודים עצמאיים */
@media(max-width:900px){.desktop-chrome,.site-top{display:none!important}}
@media(max-width:520px){
 .topbar{margin-bottom:10px}
 .difficulty-switch .new-btn{height:29px;font-size:10px;padding:0 8px;margin-right:1px}
 .numpad{margin-top:10px;margin-bottom:4px}
}

/* גרסה 4 — ריווח iframe, אייקון מידע ופרסומות צד */
.info-symbol{display:inline-flex;align-items:center;justify-content:center;flex:none;width:17px;height:17px;border:1.6px solid currentColor;border-radius:50%;font-family:Arial,sans-serif;font-size:12px;font-weight:800;line-height:1;font-style:normal}
.info-bottom{display:inline-flex;align-items:center;justify-content:center;gap:6px}
.iframe-mode .topbar{margin-top:0}
/* מיקום פרסומות צד במחשב, רחוק יותר מגבולות המשחק */
.desktop-side-ads .side-ad.left{left:-230px}
.desktop-side-ads .side-ad.right{right:-230px}
@media(max-width:900px){.desktop-chrome,.desktop-side-ads{display:none!important}}

/* גרסה 5 – אזור משחק רציף: אין אלמנט/בלוק ריק למודעות בין הכפתורים ללוח.
   הרווח נוצר כ-margin פנימי בתוך כרטיס המשחק. אין הבטחה לחסימת Auto ads; 
   להחרגה מלאה יש להגדיר Excluded areas ב-AdSense. */
#sudoku-play-area{position:relative;isolation:isolate}
#sudoku-play-area > .difficulty-switch{margin:0 auto 12px;padding:0;max-width:520px}
.iframe-mode #sudoku-play-area > .difficulty-switch{margin-top:1px}
@media(max-width:520px){#sudoku-play-area > .difficulty-switch{margin-bottom:10px}}
@media print{#sudoku-play-area > .difficulty-switch{display:none!important}}

/* גרסה 6: ממשק רציף מכפתורי הרמה ועד השעון (כולל כל הפעולות).
   פרסומות אוטומטיות עשויות עדיין להיכנס גם בתוך מעטפת;
   לחסימה מחייבת צריך להגדיר החרגה ב-AdSense. */
#sudoku-play-area .sudoku-interface{display:flex;flex-direction:column;align-items:stretch;position:relative;isolation:isolate;width:100%;max-width:100%;}
#sudoku-play-area .sudoku-interface > .difficulty-switch{margin:0 auto 12px;padding:0;max-width:520px;width:100%;}
#sudoku-play-area .sudoku-interface > .board{flex:none;}
#sudoku-play-area .sudoku-interface > .timer{order:20;margin:8px auto 2px;}
#sudoku-play-area .sudoku-interface > .message{order:19;}
@media(max-width:520px){#sudoku-play-area .sudoku-interface > .difficulty-switch{margin-bottom:10px}}
@media print{#sudoku-play-area .sudoku-interface > .difficulty-switch{display:none!important}}

/* תיקון פריסת מספרים 1–9: כמו לפני מעטפת flex בגרסה 6.
   רצועה ברוחב הלוח, תשע עמודות שוות במחשב ובטלפון. */
#sudoku-play-area .sudoku-interface > .numpad{
  width:min(100%,450px);
  max-width:450px;
  min-width:0;
  align-self:center;
  display:grid;
  grid-template-columns:repeat(9,minmax(0,1fr));
  direction:ltr;
}
#sudoku-play-area .sudoku-interface > .numpad > .num-btn{
  width:100%;
  min-width:0;
  aspect-ratio:1 / 1;
}

/* גרסה 8: משטח מספרים מלא, כמו הפריסה הרחבה שאושרה לפני גרסה 6. */
#sudoku-play-area .sudoku-interface > .numpad{
  width:min(100%,450px);
  max-width:450px;
  flex:none;
  align-self:center;
  grid-template-columns:repeat(9,minmax(0,1fr));
  gap:5px;
}
#sudoku-play-area .sudoku-interface > .numpad > .num-btn{width:100%;min-width:0;aspect-ratio:1/1}
@media(max-width:520px){#sudoku-play-area .sudoku-interface > .numpad{gap:3px}}
/* הרחיקו את שתי מודעות הצד מהמשחק בדפי מחשב עצמאיים בלבד. */
.desktop-side-ads .side-ad.left{left:-275px}
.desktop-side-ads .side-ad.right{right:-275px}

/* v9 – מסך סיום: יישור לכיוון תחילת לוח המשחק */
.overlay.finish-mode{align-items:flex-start;padding-top:clamp(70px,var(--finish-board-top,110px),28vh);padding-bottom:12px}
.overlay.finish-mode .modal{flex:none;margin:0 auto;max-height:calc(100dvh - clamp(70px,var(--finish-board-top,110px),28vh) - 12px);overflow-y:auto;width:min(94vw,425px);padding:28px 20px 22px}
.finish-description{margin:8px 0 16px!important}
.modal .finish-next{display:block;width:min(100%,290px);margin:0 auto;border:0;border-radius:12px;padding:12px 14px;background:#5cc86d;color:#fff;font-size:16px;font-weight:800;cursor:pointer;box-shadow:0 3px 0 #36a84d}
.finish-other-heading{font-size:15px;font-weight:800;color:#536781;margin:21px 0 10px}
.finish-levels{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}
.modal .finish-level-btn{min-width:85px;height:39px;border:1px solid #cddff2;background:#edf5ff;color:#1767b9;border-radius:10px;font-size:13px;font-weight:700;padding:0 12px;cursor:pointer}
.finish-links{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:22px;padding-top:15px;border-top:1px solid #e4eaf1}
.finish-link{display:flex;align-items:center;justify-content:center;min-height:43px;border-radius:11px;padding:8px;text-decoration:none;font-weight:800;font-size:12px;text-align:center}
.finish-link.sudoku-more{background:#f1e9ff;color:#7442b6;border:1px solid #d9c5f4}
.finish-link.games-more{background:#fff0df;color:#aa6218;border:1px solid #f2d0a9}
@media(max-width:400px){.overlay.finish-mode .modal{padding:24px 12px 17px}.finish-levels{gap:5px}.modal .finish-level-btn{min-width:76px}}

/* v10 – תיקון קו עקום בין שורות 6–7: כל שורות ה-Grid קבועות ושוות.
   מבטלים aspect-ratio עצמאי של כל כפתור כדי שלא יכפה גובה שורה משתנה. */
#sudoku-play-area .board{
  grid-template-rows:repeat(9,minmax(0,1fr));
  grid-auto-rows:minmax(0,1fr);
  align-items:stretch;
}
#sudoku-play-area .board > .cell{
  box-sizing:border-box;
  width:100%;
  height:100%;
  aspect-ratio:auto;
  margin:0;
  border-radius:0;
  appearance:none;
  -webkit-appearance:none;
}
