/* =========================================================================
 * מטגנת הזהב — ui.css : מעטפת המסך (פתקים על חוט, פתק גדול, פח, טאבים, אפקטים)
 * נטען אחרון.
 * ========================================================================= */

/* המסילה והלוח של הליבה מוחלפים ע"י js/stations/ui.js */
#ticket-rail, #ticket-panel { display: none; }

/* ---------- החוט והפתקים ---------- */
#hud { overflow: visible; }
#order-line {
  flex: 1; min-width: 0; align-self: stretch; position: relative;
  display: flex; align-items: flex-start; gap: 8px; padding: 9px 12px 0;
}
#order-line::before { /* החוט */
  content: ""; position: absolute; top: 12px; left: -4px; right: -4px; height: 3px;
  background: repeating-linear-gradient(90deg, #f3dcb4 0 7px, #c9a26b 7px 12px);
  border-radius: 2px; box-shadow: 0 2px 2px rgba(0, 0, 0, 0.35);
}
.line-empty { margin: 22px auto 0; color: #e8c79a; font-size: 17px; font-weight: 700; opacity: 0.8; }
.line-ticket {
  position: relative; width: 84px; height: 74px; flex: 0 1 84px; min-width: 0; padding: 14px 4px 4px;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  background: linear-gradient(#fffefa, #fdf3dc); border: none; border-radius: 3px 3px 10px 10px;
  box-shadow: 0 4px 7px rgba(0, 0, 0, 0.4); font-family: var(--font); color: var(--cocoa); cursor: grab;
  transform-origin: 50% 0; transform: rotate(-1.5deg); transition: transform 0.15s, box-shadow 0.15s;
  animation: dropIn 0.45s cubic-bezier(.2, 1.5, .4, 1);
}
.line-ticket:nth-child(even) { transform: rotate(1.5deg); }
.line-ticket::before { /* אטב */
  content: ""; position: absolute; top: -4px; left: 50%; width: 13px; height: 17px; margin-left: -6px;
  background: linear-gradient(90deg, #d8a25e, #f2c987, #b57c3d); border-radius: 3px; box-shadow: 0 1px 2px rgba(0,0,0,.4);
}
.line-ticket:hover { transform: rotate(0) translateY(3px) scale(1.05); }
.line-ticket.active { transform: translateY(5px) scale(1.09); box-shadow: 0 0 0 4px var(--gold), 0 8px 12px rgba(0, 0, 0, 0.45); z-index: 2; }
.lt-num { font-size: 16px; font-weight: 900; line-height: 1; }
.lt-donuts { display: flex; justify-content: center; align-items: center; height: 26px; pointer-events: none; }
.lt-donuts svg { opacity: 0.5; }
.lt-donuts svg.has { opacity: 1; filter: drop-shadow(0 0 3px var(--good)); }
.line-ticket.ghost { width: 74px; height: 64px; justify-content: center; font-size: 22px; font-weight: 900; }
@keyframes dropIn { from { translate: 0 -60px; opacity: 0; } to { translate: 0 0; opacity: 1; } }

/* ---------- מד סבלנות ---------- */
.pbar { position: relative; display: block; width: 100%; height: 9px; border-radius: 9px; background: #e9dcc2; overflow: hidden; flex: none; }
.pbar > i { position: absolute; top: 0; bottom: 0; right: 0; width: 100%; border-radius: 9px; background: var(--good); transition: width 0.25s linear, background 0.3s; }
.pbar.mid > i { background: var(--mid); }
.pbar.bad > i { background: var(--bad); }
.pbar.blink { animation: blink 0.4s steps(2, start) infinite; box-shadow: 0 0 6px var(--bad); }
@keyframes blink { 50% { opacity: 0.25; } }

/* ---------- העמודה הצדדית: פתק גדול ופח ---------- */
#side-col { width: 236px; height: 572px; flex: none; display: flex; flex-direction: column; position: relative;
  background: repeating-linear-gradient(90deg, #a86a37 0 58px, #9a5e2e 58px 60px); border-right: 5px solid #6b3a17; }
.note-wrap { flex: 1; min-height: 0; padding: 14px 10px 4px; position: relative; display: flex; flex-direction: column; }
.note-wrap::before { /* נעץ */
  content: ""; position: absolute; top: 5px; left: 50%; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; z-index: 2;
  background: radial-gradient(circle at 35% 35%, #ffb0a0, #e0402f 60%, #8e2418); box-shadow: 0 3px 4px rgba(0,0,0,.35);
}
.order-note {
  flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 5px; padding: 12px 7px 8px;
  background: linear-gradient(#fffefa, #fcf1d8); border-radius: 4px 4px 14px 14px;
  box-shadow: 0 6px 12px rgba(40, 18, 0, 0.4); transform-origin: 50% 0;
}
.order-note.swing { animation: swing 0.8s ease-out; }
@keyframes swing { 0% { transform: rotate(7deg) translateY(-14px); } 30% { transform: rotate(-4deg); } 60% { transform: rotate(2deg); } 100% { transform: none; } }
.drop-over .order-note { box-shadow: 0 0 0 5px var(--gold), 0 6px 12px rgba(40, 18, 0, 0.4); }
.note-empty { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 10px; opacity: 0.55; font-size: 20px; }
.note-empty-ic svg { width: 90px; height: 90px; }
.note-head { display: flex; align-items: center; gap: 6px; }
.note-face { flex: none; background: #ffe9c2; border-radius: 50%; border: 2px solid #e8c079; overflow: hidden !important; }
.note-num { font-size: 27px; font-weight: 900; }
.note-name { font-size: 18px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-pbar { height: 12px; }
.note-items { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 5px; scrollbar-width: thin; }
.note-item { flex: 1 0 auto; display: flex; align-items: center; gap: 4px; padding: 3px 2px; border-top: 2px dashed #e5cb9c; }
.note-item.started { background: rgba(63, 174, 91, 0.08); }
.note-pics { display: flex; flex-direction: column; align-items: center; flex: none; width: 68px; }
.note-now { margin-top: 2px; background: #fff; border-radius: 50%; border: 2px solid #bfe0c4; }
.order-note.n1 .note-item { flex-direction: column; justify-content: center; gap: 10px; }
.order-note.n1 .note-pics { flex-direction: row; width: auto; gap: 8px; }
.order-note.n3 .note-pics { width: 52px; }

/* מתכון באיורים */
.recipe { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.order-note.n1 .recipe { flex: none; width: 100%; gap: 8px; }
.ri-row { display: flex; align-items: center; gap: 4px; background: #fff; border: 1.5px solid #efdcb8; border-radius: 10px; padding: 1px 4px; }
.ri-station { flex: none; display: inline-flex; opacity: 0.55; padding-left: 3px; border-left: 2px solid #efdcb8; }
.ri-station svg { width: 18px; height: 18px; }
.ri-icons { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; }
.ri { position: relative; display: inline-flex; }
.ri.many { margin-left: 7px; }
.ri-x { position: absolute; bottom: -3px; left: -8px; font-size: 11px; font-weight: 900; background: var(--pink); color: #fff; border-radius: 8px; padding: 0 3px; line-height: 13px; direction: ltr; }
.ri-word { font-size: 13px; font-weight: 800; }
.ri-none { font-size: 13px; font-weight: 700; color: #9a7650; }

/* ---------- פח ---------- */
#trash-bin { height: 100px; flex: none; display: flex; align-items: center; justify-content: center; margin: 0 10px 6px; border-radius: 18px; border: 3px dashed transparent; transition: background 0.15s, border-color 0.15s, transform 0.15s; }
#trash-bin .bin-lid { transition: transform 0.18s; transform-box: fill-box; transform-origin: 100% 100%; }
body.dragging #trash-bin { border-color: rgba(255, 255, 255, 0.55); background: rgba(255, 255, 255, 0.12); }
body.dragging #trash-bin.drop-over { border-color: #fff; background: rgba(224, 64, 47, 0.55); transform: scale(1.06); }
#trash-bin.drop-over .bin-lid { transform: rotate(32deg); }
#trash-bin.gulp { animation: gulp 0.45s ease-out; }
@keyframes gulp { 25% { transform: scale(1.18, 0.85); } 55% { transform: scale(0.9, 1.1); } }

/* ---------- גרירה ---------- */
.drag-ghost { position: absolute; z-index: 90; pointer-events: none; transform: translate(-50%, -55%) scale(1.08) rotate(-4deg); filter: drop-shadow(0 12px 10px rgba(40, 18, 0, 0.35)); }
body.dragging, body.dragging * { cursor: grabbing !important; }
.station-btn.drop-over { transform: translateY(-8px) scale(1.04); box-shadow: 0 0 0 5px var(--good); }

/* ---------- טאבים גדולים בתחתית ---------- */
#station-bar { justify-content: flex-start; gap: 8px; padding: 0 10px 0 220px; align-items: flex-end; }
.station-btn { flex: 1; height: 58px; font-size: 24px; border-radius: 18px 18px 0 0; border-bottom: none; box-shadow: none; transition: height 0.12s, transform 0.12s; }
.station-btn:hover { transform: none; height: 62px; }
.station-btn:active { height: 55px; }
.station-btn.active, .station-btn.active:hover { height: 66px; font-size: 27px; box-shadow: 0 -3px 14px rgba(246, 196, 69, 0.7); }
.station-btn .station-icon svg { width: 42px; height: 42px; }
.station-btn.active .station-icon { animation: tabHop 0.4s ease-out; }
@keyframes tabHop { 40% { transform: translateY(-9px) rotate(-8deg); } }
.station-key { display: none; }
.shift-worker { right: auto; left: 12px; }
.station-badge { top: -7px; left: 8px; }

/* ---------- מעבר בין תחנות ---------- */
.station-root.slide-next { animation: slideNext 0.28s cubic-bezier(.2, .9, .3, 1); }
.station-root.slide-prev { animation: slidePrev 0.28s cubic-bezier(.2, .9, .3, 1); }
@keyframes slideNext { from { transform: translateX(-70px); opacity: 0.2; } }
@keyframes slidePrev { from { transform: translateX(70px); opacity: 0.2; } }

/* ---------- כפתורים ---------- */
.btn:hover:not(:disabled) { transform: translateY(-2px) scale(1.04); }
.btn:active:not(:disabled) { transform: translateY(3px) scale(0.96); }

/* ---------- אפקטים ---------- */
#fx-layer { position: absolute; inset: 0; pointer-events: none; z-index: 80; overflow: hidden; }
.fx-bit { position: absolute; width: 11px; height: 11px; margin: -5px; border-radius: 3px; animation: fxBit 0.65s ease-out forwards; box-shadow: 0 0 0 1.5px rgba(90, 45, 12, 0.3); }
@keyframes fxBit { to { transform: translate(var(--dx), var(--dy)) rotate(220deg) scale(0.3); opacity: 0; } }
.fx-float { position: absolute; transform: translate(-50%, -50%); font-size: 30px; font-weight: 900; white-space: nowrap; -webkit-text-stroke: 5px #fff; paint-order: stroke fill; animation: fxFloat 1.05s ease-out forwards; }
.fx-float.good { color: #2e9a4a; }
.fx-float.bad { color: var(--bad); }
@keyframes fxFloat { 0% { translate: 0 10px; scale: 0.5; opacity: 0; } 20% { scale: 1.2; opacity: 1; } 70% { opacity: 1; } 100% { translate: 0 -60px; scale: 1; opacity: 0; } }
#play.shake { animation: shake 0.35s linear; }
@keyframes shake { 20% { translate: -9px 0; } 40% { translate: 8px 2px; } 60% { translate: -6px -2px; } 80% { translate: 4px 0; } }

#toast-layer { right: 236px; left: auto; width: 1044px; }

/* ---------- תחנת ההזמנות: בועה גדולה באיורים, מדי סבלנות ---------- */
.speech-bubble { left: 668px; top: 14px; width: 364px; max-height: 548px; padding: 10px 12px; border-width: 4px; border-radius: 34px; }
.speech-bubble::before { left: -26px; top: 180px; border-right-width: 24px; }
.speech-bubble::after { left: -19px; top: 183px; border-right-width: 19px; }
.speech-bubble .sb-hello { text-align: center; }
.sb-items { max-height: none; overflow: visible; gap: 8px; }
.sb-item { gap: 8px; padding: 6px; border-radius: 18px; animation: sbItem 0.35s cubic-bezier(.2, 1.5, .4, 1) backwards; }
.sb-item > svg { flex: none; }
.sb-items.n1 .sb-item { flex-direction: column; }
.sb-items.n1 .sb-item > svg { width: 170px; height: 170px; }
.sb-items.n1 .recipe { width: 100%; flex: none; }
@keyframes sbItem { from { opacity: 0; transform: scale(0.6); } }
.cust-meter.blink { animation: blink 0.4s steps(2, start) infinite; }
.anger { animation: angerPulse 0.4s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 50% 50%; }
@keyframes angerPulse { to { scale: 1.3; } }

/* ---------- בצק חופשי ---------- */
.note-now { width: 38px; height: 38px; margin-top: 2px; display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 2.5px dashed #cdab74; background: rgba(255,255,255,.6); }
.order-note:not(.n3) .note-now { width: 48px; height: 48px; }
.note-now.full { border: 2.5px solid #7fcf92; background: #fff; cursor: grab; }
body.dragging .note-now { border-color: var(--gold-2); animation: slotGlow 0.6s ease-in-out infinite alternate; }
.note-item.drop-over { background: #fff1b8; box-shadow: 0 0 0 3px var(--gold); border-radius: 10px; }
.note-star { color: var(--gold-2); font-size: 24px; margin-inline-start: auto; }
.dough-slots { overflow-x: auto; overflow-y: hidden; gap: 8px; align-items: center; scrollbar-width: thin; }
.dough-loose { flex: none; width: 104px; height: 104px; display: flex; align-items: center; justify-content: center; background: #fff; border: 3px solid #b9c3cc; border-radius: 50%; cursor: grab; transition: transform .12s, border-color .12s; }
.dough-loose:hover { transform: translateY(-4px) scale(1.06); border-color: var(--gold); }
.dough-loose.just-added { animation: slotPop 0.45s ease-out; }
.dough-tray.drop-over, .fry-tray.drop-over, .fin-tray.drop-over { box-shadow: 0 0 0 5px var(--good); }
.fry-main.drop-over .fry-pot { filter: brightness(1.08); }
.fin-card { position: relative; flex: none; width: 78px; justify-content: center; padding: 4px; cursor: grab; }
.fin-cards { min-width: 0; overflow-x: auto; gap: 8px; padding: 4px; }
.fin-card-num { position: absolute; top: 2px; right: 4px; font-size: 14px; font-weight: 900; }
.fin-card.loose { border-style: dashed; }
.fin-sep { flex: none; font-weight: 800; font-size: 14px; padding: 0 8px; border-right: 3px dashed #e0c59c; }
.fin-tray-title { min-width: 0; }
.fin-serve { margin-right: auto; flex: none; }

/* ---------- הגדרות ---------- */
.modal-settings { width: 560px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 6px; border-bottom: 2px dashed #e0c59c; font-size: 21px; }
.set-ctl { display: flex; gap: 8px; }
.set-ctl input[type=range] { width: 240px; height: 30px; accent-color: var(--gold-2); }
.title-difficulty { margin-bottom: 14px; font-size: 19px; }

/* ---------- מסך ציון: חשיפה בזה אחר זה ---------- */
.modal-score { width: 820px; }
.score-donuts > * { animation: popIn 0.4s cubic-bezier(.2, 1.6, .4, 1) backwards; }
.score-bar { animation: rowIn 0.35s ease-out backwards; margin: 9px 0; }
.score-bar .bar { height: 24px; }
.score-bar .bar i { animation: grow 0.6s ease-out backwards; }
.score-bar b { font-size: 23px; width: 46px; animation: popIn 0.3s cubic-bezier(.2, 1.8, .4, 1) backwards; }
.score-details > .score-bar:nth-of-type(2), .score-details > .score-bar:nth-of-type(2) * { animation-delay: 0.4s; }
.score-details > .score-bar:nth-of-type(3), .score-details > .score-bar:nth-of-type(3) * { animation-delay: 0.9s; }
.score-details > .score-bar:nth-of-type(4), .score-details > .score-bar:nth-of-type(4) * { animation-delay: 1.4s; }
.score-details > .score-bar:nth-of-type(5), .score-details > .score-bar:nth-of-type(5) * { animation-delay: 1.9s; }
.score-mistakes { margin-top: 8px; padding: 7px 12px; background: #ffe9e5; border: 2px solid #f09a8f; border-radius: 12px; color: #9e2a1e; animation: rowIn 0.4s ease-out 2.4s backwards, shake 0.35s linear 2.8s; }
.score-total { animation: rowIn 0.4s ease-out 2.7s backwards; font-size: 21px; }
.score-stars .star { display: inline-block; font-size: 38px; animation: starIn 0.45s cubic-bezier(.2, 2, .4, 1) backwards; }
.score-stars .star:nth-child(1) { animation-delay: 2.8s; }
.score-stars .star:nth-child(2) { animation-delay: 3s; }
.score-stars .star:nth-child(3) { animation-delay: 3.2s; }
.score-stars .star:nth-child(4) { animation-delay: 3.4s; }
.score-stars .star:nth-child(5) { animation-delay: 3.6s; }
.score-customer svg { animation: bob 1.2s ease-in-out infinite alternate; }
@keyframes rowIn { from { opacity: 0; transform: translateX(40px); } }
@keyframes starIn { from { opacity: 0; transform: scale(3) rotate(-90deg); } }
.sum-row { animation: rowIn 0.35s ease-out backwards; }
.sum-row:nth-child(2) { animation-delay: .12s; } .sum-row:nth-child(3) { animation-delay: .24s; } .sum-row:nth-child(4) { animation-delay: .36s; }
.sum-row:nth-child(5) { animation-delay: .48s; } .sum-row:nth-child(6) { animation-delay: .6s; } .sum-row:nth-child(7) { animation-delay: .72s; }
.sum-row:nth-child(n+8) { animation-delay: .84s; }
.modal-day .day-summary { gap: 4px; }

/* התאמות אחרי בדיקה */
.dough-loose { width: 88px; height: 88px; }
.dough-loose svg { width: 72px; height: 72px; }
.dough-slots { padding: 4px 2px 0; }
.modal-day { width: 720px; }
.modal-day .day-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.title-help { display: none; }
.floater.f4 { top: 590px; left: 300px; }

/* ---------- רקעים ולקוחות ---------- */
.station-bg { position: absolute; left: 0; top: 0; display: block; }
.dough-backdrop, .station-bg { pointer-events: none; }
.fry-main.has-art { background: none; }
.cust-node { transition: transform 0.6s cubic-bezier(.3, .8, .4, 1); }
.cust-gone { opacity: 0; transition: opacity 0.8s; }

/* ---------- מסך פתיחה ואודות ---------- */
.title-box .title-difficulty { margin-bottom: 16px; }
.title-extra { margin-top: 18px; }
.title-start { min-width: 280px; font-size: 30px; }
.title-footer { position: absolute; bottom: 10px; left: 0; right: 0; z-index: 3; text-align: center; font-family: "Assistant", var(--font); font-size: 15px; font-weight: 600; color: #4a2610; }
.floater.f4 { top: 580px; left: 250px; }
.modal-about { width: 560px; background: #fffdf8; border-color: #a8843f; color: #141c31; text-align: center; font-family: "Assistant", var(--font); }
.modal-about .modal-title, .modal-about h3 { font-family: "Frank Ruhl Libre", "David", "Times New Roman", serif; color: #141c31; }
.modal-about h3 { font-size: 22px; margin: 8px 0; }
.about-logo { width: 150px; height: 150px; margin: 0 auto; border-radius: 50%; background: #fffdf8; border: 3px solid #a8843f; display: flex; align-items: center; justify-content: center; }
.about-logo img { width: 118px; }
.about-slogan { margin: 4px 0; font-size: 24px; font-weight: 700; color: #a8843f; font-family: "Frank Ruhl Libre", "David", serif; }
.about-phone { margin: 6px 0 12px; font-size: 26px; font-weight: 800; }
.about-small { margin: 3px 0; font-size: 14px; }

/* ---------- שכבות רקע כתמונה ---------- */
canvas.station-bg { width: 1044px; height: 572px; }
.order-top { pointer-events: none; }

/* ---------- טיגון: סיר על הדלפק, מדים אופקיים צמודים לכל מקום ---------- */
.fry-pot { top: 66px; }
.fry-cards { top: 446px; height: 126px; }
.fry-card { height: 122px; padding: 3px 7px 5px; gap: 2px; justify-content: flex-start; }
.fry-card.empty { display: none; }
.fc-head { font-size: 14px; line-height: 1; }
.fc-gauges { flex-direction: column; gap: 3px; width: 100%; }
.fg-wrap { flex-direction: row; width: 100%; gap: 5px; }
.fg { flex: 1; width: auto; height: 17px; border-radius: 9px; }
.fg-fill { top: 0; bottom: 0; right: 0; left: auto; width: 0; height: auto; border-top: none; border-left: 3px solid var(--cocoa); }
.fg-zone { top: 0; bottom: 0; left: auto; height: auto; border: none; border-left: 2px solid var(--good); border-right: 2px solid var(--good); }
.fg-burn { top: 0; bottom: 0; left: 0; right: auto; }
.fg-target { top: 0; bottom: 0; left: auto; width: 2px; height: auto; }
.fg-label { width: 24px; padding: 0; text-align: center; font-size: 13px; }
.fg-wrap.active .fg-label::before { content: none; }
.fc-status { min-height: 16px; font-size: 13px; line-height: 16px; }
.fc-buttons .btn-small { padding: 3px 14px; font-size: 14px; }
.fry-legend { display: none; }

/* ---------- פתק גדול קריא ---------- */
.order-note .ri-station { display: none; }
.order-note .ri-row { border: none; padding: 1px 3px; gap: 2px; }
.order-note .ri-row:nth-child(1) { background: #f6e3bd; }
.order-note .ri-row:nth-child(2) { background: #ffd9a8; }
.order-note .ri-row:nth-child(3) { background: #ffdce8; }
.order-note .ri-word { font-size: 15px; }
.order-note.n3 .note-pics { width: 50px; }
.dough-steps { display: none; }
.fly-ticket { position: absolute; width: 70px; height: 62px; display: flex; align-items: center; justify-content: center; background: #fffdf3; border-radius: 3px 3px 10px 10px; box-shadow: 0 8px 14px rgba(0,0,0,.4); font-size: 22px; font-weight: 900; }

/* ---------- טקס המסירה ---------- */
.modal-serve { width: 1040px; max-width: 1040px; padding: 12px 20px 14px; overflow: hidden; }
.modal-serve .modal-title { font-size: 28px; margin-bottom: 4px; }
.modal-serve .modal-buttons { margin-top: 6px; }
.sv-layout { display: flex; align-items: stretch; gap: 14px; }
.sv-who { width: 220px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; background: linear-gradient(#fdeccd 70%, #d9a86c 70%); border-radius: 18px; padding-bottom: 4px; }
.sv-say { min-height: 54px; margin: 6px 8px auto; padding: 6px 12px; background: #fff; border-radius: 16px; font-weight: 800; font-size: 18px; text-align: center; visibility: hidden; }
.sv-say.on { visibility: visible; animation: popIn 0.3s cubic-bezier(.2, 1.8, .4, 1); }
.sv-mid { flex: 1; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.sv-box { display: flex; gap: 10px; justify-content: center; padding: 10px 18px; background: linear-gradient(#e8b97c, #c98f55); border: 4px solid #8a5a2e; border-radius: 14px; box-shadow: inset 0 6px 14px rgba(70,35,5,.35); }
.sv-donut { min-width: 96px; min-height: 96px; display: flex; align-items: center; justify-content: center; background: #fff8ec; border-radius: 12px; animation: intoBox 0.5s cubic-bezier(.3, 1.5, .5, 1) backwards; }
.sv-donut.missing { color: var(--bad); font-weight: 900; }
@keyframes intoBox { from { transform: translateY(-120px) rotate(-60deg); opacity: 0; } }
.sv-marks { display: flex; gap: 22px; }
.sv-mark { display: flex; flex-direction: column; align-items: center; opacity: 0.3; transform: scale(0.9); transition: opacity .2s, transform .25s cubic-bezier(.2, 2, .4, 1); }
.sv-mark.on { opacity: 1; transform: none; }
.sv-mark small { font-size: 16px; font-weight: 800; }
.sv-ring { width: 92px; height: 92px; border-radius: 50%; background: #efdfc4; display: flex; align-items: center; justify-content: center; box-shadow: 0 3px 6px rgba(90,45,12,.25); }
.sv-ring-in { width: 70px; height: 70px; border-radius: 50%; background: #fff8ec; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.sv-ring-in b { font-size: 25px; line-height: 1; }
.sv-ic svg { width: 28px; height: 28px; display: block; }
.sv-mistakes { min-height: 30px; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; align-items: center; visibility: hidden; }
.sv-mistakes.on { visibility: visible; animation: rowIn 0.3s ease-out; }
.sv-miss { background: #ffe9e5; border: 2px solid #f09a8f; color: #9e2a1e; border-radius: 999px; padding: 2px 12px; font-weight: 800; font-size: 15px; }
.sv-pen { color: var(--bad); font-size: 24px; }
.sv-end { display: flex; align-items: center; gap: 22px; min-height: 68px; }
.sv-total, .sv-stars { visibility: hidden; }
.sv-total.on { visibility: visible; display: flex; align-items: baseline; gap: 8px; animation: starIn 0.45s cubic-bezier(.2, 2, .4, 1) backwards; }
.sv-total b { font-size: 56px; font-weight: 900; line-height: 1; }
.sv-total small { font-size: 18px; font-weight: 800; }
.sv-stars.on { visibility: visible; }
.sv-stars .star { display: inline-block; font-size: 52px; }
.sv-stars.on .star { animation: starIn 0.45s cubic-bezier(.2, 2, .4, 1) backwards; }
.sv-stars.on .star:nth-child(2) { animation-delay: .12s; } .sv-stars.on .star:nth-child(3) { animation-delay: .24s; }
.sv-stars.on .star:nth-child(4) { animation-delay: .36s; } .sv-stars.on .star:nth-child(5) { animation-delay: .48s; }
.sv-jar { position: relative; width: 140px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 8px; }
.sv-tip, .sv-xp { visibility: hidden; }
.sv-jar.on .sv-tip { visibility: visible; font-size: 36px; font-weight: 900; color: #2e9a4a; direction: ltr; animation: popIn 0.35s cubic-bezier(.2, 1.8, .4, 1); }
.sv-jar.on .sv-xp { visibility: visible; font-size: 16px; font-weight: 800; color: #d4458a; }
.sv-jar.on .sv-jar-pic { animation: gulp 0.5s ease-out 0.5s; }
.sv-coin { position: absolute; top: 20px; left: 56px; width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff3b0, var(--gold) 55%, var(--gold-3)); border: 2px solid var(--gold-3); opacity: 0; animation: coinDrop 0.6s ease-in forwards; }
@keyframes coinDrop { 0% { opacity: 1; transform: translateY(0); } 85% { opacity: 1; } 100% { opacity: 0; transform: translateY(190px) rotate(300deg); } }

/* ============================ סבב 3 ============================ */
/* לוח הממתינים */
.wait-board { position: absolute; left: 12px; bottom: 10px; z-index: 3; max-width: 424px; padding: 4px 8px 8px; background: #6b3a17; border: 4px solid #c98b52; border-radius: 14px; box-shadow: 0 6px 12px rgba(0,0,0,.35); }
.wb-title { display: block; text-align: center; color: #fff1dc; font-size: 17px; margin-bottom: 4px; }
.wb-row { display: flex; gap: 6px; }
.wb-card { width: 74px; flex: 0 1 74px; min-width: 0; padding: 2px 4px 5px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-family: var(--font); font-weight: 900; font-size: 15px; color: var(--cocoa); background: #fff8ec; border: 3px solid #e8c79a; border-radius: 12px; cursor: pointer; overflow: hidden; }
.wb-card.active { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(246,196,69,.6); }
.wb-card svg { overflow: hidden; }
/* טקס הרישום */
.speech-bubble.notepad { left: 20px; background: repeating-linear-gradient(#fffdf3 0 31px, #cfe2ec 31px 33px); border-color: #c4572c; border-radius: 12px; border-top-width: 16px; }
.speech-bubble.notepad::before, .speech-bubble.notepad::after { display: none; }
.speech-bubble.notepad .ri-row { animation: writeRow 0.35s ease-out backwards; }
@keyframes writeRow { from { clip-path: inset(0 0 0 100%); opacity: 0.2; } to { clip-path: inset(0 0 0 0); } }
.order-worker { transition: transform 0.45s cubic-bezier(.3, 1.2, .4, 1); }
.order-worker .pad { opacity: 0; transition: opacity 0.2s; }
.order-worker.writing { transform: translate(-170px, -34px); }
.order-worker.writing .pad { opacity: 1; }
.order-worker.writing .pencil { animation: scribble 0.22s ease-in-out infinite alternate; animation-iteration-count: 14; }
.order-worker .scrawl { stroke-dasharray: 140; stroke-dashoffset: 140; }
.order-worker.writing .scrawl { animation: scrawl var(--write, 2s) linear forwards; }
@keyframes scribble { from { transform: translate(-6px, 2px); } to { transform: translate(8px, -2px) rotate(4deg); } }
@keyframes scrawl { to { stroke-dashoffset: 0; } }

/* גימור: קופסה, חלון הגשה, ארון כלים */
.station-finish .fin-tray { position: absolute; top: 6px; right: 10px; left: 10px; height: 118px; display: flex; align-items: stretch; gap: 10px; padding: 0; background: none; border: none; box-shadow: none; }
.fin-box { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: linear-gradient(#f3d9a8, #dcae6c); border: 4px solid #a8743c; border-radius: 12px; box-shadow: inset 0 8px 14px rgba(90,45,12,.25), 0 8px 12px rgba(60,30,5,.3); cursor: grab; }
.fin-box.none { opacity: 0.6; cursor: default; }
.fin-handle { display: flex; flex-direction: column; align-items: center; width: 76px; line-height: 1.15; }
.fin-handle b { font-size: 30px; }
.fin-handle small { font-size: 13px; font-weight: 800; text-align: center; }
.fin-box .fin-cards, .fin-loose { flex: none; padding: 0; align-items: center; }
.fin-box .fin-card { height: 88px; width: 86px; background: #fffaf0; border-style: solid; box-shadow: inset 0 3px 6px rgba(90,45,12,.2); }
.fin-loose { display: flex; gap: 6px; max-width: 220px; overflow-x: auto; padding: 4px 8px; background: #d5dde4; border: 3px solid #9fb0bf; border-radius: 14px; }
.fin-client { margin-inline-start: auto; width: 150px; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 0 8px 4px; background: linear-gradient(#bfe6f7, #fff3dc); border: 5px solid #8a5a2e; border-radius: 60px 60px 8px 8px; position: relative; }
.fin-client svg { overflow: hidden; }
.fin-client-name { position: absolute; top: 2px; font-size: 12px; font-weight: 900; background: #fff8ec; border-radius: 8px; padding: 0 6px; }
.fin-client .pbar { height: 8px; }
.delivering .fin-client { border-color: var(--good); animation: slotGlow 0.5s ease-in-out infinite alternate; }
.fin-client.drop-over { transform: scale(1.1); box-shadow: 0 0 0 6px var(--good); }
.box-ghost { display: flex; gap: 4px; padding: 8px 10px; background: linear-gradient(#f3d9a8, #dcae6c); border: 4px solid #a8743c; border-radius: 10px; }
.station-finish .fin-work { position: absolute; top: 128px; left: 10px; width: 626px; height: 440px; overflow: hidden; background: none; }
.station-finish .fin-svg { margin-top: -8px; }
.station-finish .fin-empty { margin: 40px 100px; background: rgba(255,248,236,.94); border: 4px solid #c98b52; border-radius: 20px; }
.station-finish .fin-tools { position: absolute; top: 132px; right: 8px; width: 392px; height: 434px; padding: 8px 10px; gap: 6px; background: repeating-linear-gradient(90deg, #b97a40 0 46px, #ad7038 46px 48px); border: 5px solid #7d4a22; border-radius: 16px; box-shadow: 0 8px 14px rgba(60,30,5,.35); }
.fin-tab { padding: 4px 2px; font-size: 14px; }
.fin-opts { grid-template-columns: repeat(3, 1fr); gap: 4px 8px; align-content: start; }
.fin-opt { position: relative; background: transparent; border: 3px solid transparent; border-bottom: 9px solid #6b3a17; border-radius: 10px 10px 4px 4px; padding: 0 2px 1px; }
.fin-opt span { color: #fff8ec; font-size: 12px; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.fin-opt.sel { background: rgba(255,236,170,.45); border-color: var(--gold); border-bottom-color: var(--gold-2); box-shadow: 0 0 10px rgba(246,196,69,.8); }
.fin-opt.locked { cursor: default; }
.fin-opt.locked svg { filter: grayscale(.7) brightness(.8); opacity: .75; }
.fin-req { background: #fff8ec; padding: 3px 8px; }
.fin-gauges { background: #fff8ec; border-radius: 10px; padding: 3px 8px 5px; }
.fin-gauges:empty { display: none; }
.fin-hint { font-size: 12.5px; padding: 3px 8px; }

/* סיר: כרטיסים גדולים */
.fry-toolbar { display: none; }
.fry-pot { top: 34px; }
.fry-cards { top: 394px; height: 178px; }
.fry-card { height: 172px; padding: 6px 8px; gap: 5px; }
.fc-head { font-size: 16px; }
.fc-head b { white-space: nowrap; font-size: 15px; }
.fc-target { font-size: 14px; }
.fg { height: 24px; border-radius: 12px; }
.fg-label { width: 46px; font-size: 14px; }
.fc-status { font-size: 16px; line-height: 20px; min-height: 20px; }
.fc-note { font-size: 12.5px; font-weight: 700; color: #7a4518; margin-top: -5px; }
.fc-buttons .btn-small { padding: 7px 18px; font-size: 17px; }

/* מוניטין */
.hud-rep { width: 112px; height: 50px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.hud-rep small { font-size: 12px; font-weight: 800; }
.repstars { position: relative; display: inline-block; direction: ltr; font-size: 21px; line-height: 1.1; white-space: nowrap; }
.repstars i { font-style: normal; color: #d9c7a6; }
.repstars b { position: absolute; left: 0; top: 0; overflow: hidden; color: var(--gold-2); font-weight: 400; }

/* פתיחת יום וסוף יום */
.modal-open { width: 600px; text-align: center; }
.op-street svg { display: block; margin: 0 auto; border-radius: 16px; overflow: hidden; }
.op-shutter { animation: shutter 1.3s cubic-bezier(.4, 0, .3, 1) 0.5s forwards; transform-origin: 0 106px; }
@keyframes shutter { to { transform: scaleY(0.08); } }
.op-sun { animation: sunUp 2.2s ease-out backwards; }
@keyframes sunUp { from { transform: translateY(90px); } }
.op-info { display: flex; justify-content: center; gap: 36px; margin-top: 10px; }
.op-info span:not(.repstars) { display: flex; flex-direction: column; align-items: center; font-size: 26px; }
.op-info small { font-size: 14px; font-weight: 700; }
.op-info .repstars { font-size: 28px; }
.modal-dayv { width: 780px; max-width: 780px; text-align: center; }
.dv-stars .star { font-size: 56px; line-height: 1; display: inline-block; animation: starIn 0.45s cubic-bezier(.2,2,.4,1) backwards; }
.dv-stars .star:nth-child(2) { animation-delay: .12s; } .dv-stars .star:nth-child(3) { animation-delay: .24s; }
.dv-stars .star:nth-child(4) { animation-delay: .36s; } .dv-stars .star:nth-child(5) { animation-delay: .48s; }
.dv-score { font-size: 19px; font-weight: 800; margin-bottom: 8px; }
.dv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.dv-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 140px; padding: 8px; background: #fff; border: 3px solid #eedbbd; border-radius: 18px; animation: popIn 0.35s cubic-bezier(.2,1.6,.4,1) backwards; }
.dv-tile > small { font-size: 15px; font-weight: 800; color: #9a7650; }
.dv-tile > b { font-size: 24px; }
.dv-tile b.up { color: #2e9a4a; } .dv-tile b.down { color: var(--bad); }
.dv-tile .repstars { font-size: 34px; }
.dv-faces { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.dv-faces span { animation: popIn 0.3s cubic-bezier(.2,2,.4,1) backwards; }
.dv-faces em { font-style: normal; font-weight: 800; }
.dv-jar svg { width: 46px; height: 56px; }
.dv-money { color: var(--cocoa); line-height: 1; }
.dv-tile span:not(.repstars):not([style]) { font-size: 13px; font-weight: 700; }
.dv-xp { width: 90%; }

/* ציון נמוך וקנסות */
.sv-miss { display: inline-flex; flex-direction: column; align-items: center; border-radius: 14px; max-width: 280px; }
.sv-miss small { font-size: 12px; font-weight: 700; line-height: 1.2; text-align: center; }
.sv-jar.none .jar-coins { display: none; }
.sv-jar.on.none .sv-tip { color: #8a8078; font-size: 24px; direction: rtl; }
.sv-jar.on.none .sv-jar-pic { animation: none; filter: grayscale(.7); }

.dough-loose { position: relative; }
.warn-badge { position: absolute; top: -2px; right: -2px; width: 24px; height: 24px; border-radius: 50%; background: var(--mid); color: #fff; font-weight: 900; font-size: 17px; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; }
.warn-badge.paid { background: var(--bad); }
.dough-loose.wasteful { border-color: var(--mid); }
.fin-opt svg { width: 48px; height: 44px; }
.station-finish .fin-tools { gap: 5px; }
.fin-hint { line-height: 1.2; }
.fin-actions .btn-small { padding: 3px 14px; }
.fin-tab small { display: none; }

.fry-tray-item { position: relative; }
.sv-fail { margin: 0 auto 8px; width: max-content; padding: 4px 22px; background: var(--bad); color: #fff; border-radius: 999px; font-size: 22px; font-weight: 900; animation: popIn 0.35s cubic-bezier(.2,1.6,.4,1) 0.2s backwards; }
.modal-serve.failed .sv-total b { color: var(--bad); }

/* ============ חיבור הגרפיקה של סבב 3 ============ */
.station-finish .fin-tray { top: 0; right: auto; left: 0; width: 1044px; height: 572px; display: block; pointer-events: none; z-index: 3; }
.station-finish .fin-work { top: 0; }
.station-finish .fin-tools { top: 6px; height: 376px; gap: 4px; background: repeating-linear-gradient(90deg, rgba(185,122,64,.94) 0 46px, rgba(173,112,56,.94) 46px 48px); }
.station-finish .fin-hint { display: none; }
.station-finish .fin-actions { margin-top: auto; }
.station-finish .fin-box { position: absolute; left: 776px; top: 392px; width: 236px; height: 170px; display: block; padding: 0; background: none; border: none; box-shadow: none; pointer-events: auto; cursor: grab; transition: transform .35s, opacity .35s; }
.station-finish .fin-box svg { display: block; }
.station-finish .fin-box.given { transform: translate(-560px, -20px) scale(.5); opacity: 0; }
.station-finish .fin-handle { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); width: max-content; display: flex; flex-direction: row; gap: 8px; align-items: center; padding: 1px 14px; background: #fff8ec; border: 3px solid #a8743c; border-radius: 999px; }
.station-finish .fin-handle b { font-size: 21px; }
.station-finish .fin-handle small { font-size: 14px; }
.fin-box .fin-card { cursor: pointer; }
.fin-ring { fill: none; stroke: transparent; stroke-width: 4; }
.fin-box .fin-card.sel .fin-ring { stroke: var(--gold-2); fill: rgba(246,196,69,.3); }
.station-finish .fin-client { position: absolute; left: 10px; top: 392px; width: 150px; height: 174px; margin: 0; pointer-events: auto; border-radius: 70px 70px 12px 12px; }
.station-finish .fin-loose { position: absolute; left: 330px; top: 486px; width: 300px; height: 80px; max-width: none; pointer-events: auto; align-items: center; background: rgba(213,221,228,.85); }
.station-finish .fin-loose .fin-card { height: 66px; width: 66px; flex: none; }
.station-finish .fin-loose .fin-card svg { width: 52px; height: 52px; }
.station-finish .fin-card.st-ready svg, .station-finish .fin-loose .fin-card svg { filter: none; opacity: 1; }
.cust-node.waiting { cursor: pointer; }
.shopfront { display: block; margin: 0 auto; border-radius: 14px; }
.modal-open { width: 620px; }
.modal-dayv { padding-top: 10px; padding-bottom: 12px; }
.modal-dayv .modal-title { margin-bottom: 6px; }
.dv-top { display: flex; align-items: center; justify-content: center; gap: 28px; margin-bottom: 8px; }
.dv-top .shopfront { margin: 0; }
.modal-dayv .dv-tile { min-height: 112px; }
.modal-dayv .modal-buttons { margin-top: 10px; }
.station-finish .fin-loose:not(:has(.fin-card)) { opacity: 0; }
body.dragging .station-finish .fin-loose { opacity: 1; }
.fin-opt svg { width: 62px; height: 54px; }
.fin-opt.locked svg { filter: none; opacity: 1; }

/* ציורי הקופסה (דופן קדמית, מכסה סגור מוסתר) לא חוסמים לחיצה על הסופגניות */
.fin-box svg * { pointer-events: none; }
.fin-box svg .fin-card, .fin-box svg .fin-card * { pointer-events: all; }
.station-finish ~ #side-col .note-item { cursor: pointer; }


/* ============================ סבב 4 ============================ */
/* פתקים מוגדלים */
.peek { position: absolute; top: 86px; z-index: 45; display: flex; align-items: flex-start; gap: 6px; }
.peek.dropping { left: 236px; width: 1044px; justify-content: center; padding: 0 4px; }
.peek.hovering { pointer-events: none; }
.peek-card { flex: 0 1 252px; min-width: 0; padding: 4px 5px 6px; background: linear-gradient(#fffefa, #fdf0d2); border: 3px solid #e2a94f; border-radius: 6px 6px 16px 16px; box-shadow: 0 10px 18px rgba(40,18,0,.45); animation: popIn 0.18s ease-out; }
.peek-head { display: flex; gap: 8px; align-items: baseline; justify-content: center; font-weight: 800; font-size: 15px; white-space: nowrap; overflow: hidden; }
.peek-head b { font-size: 22px; }
.peek-item { position: relative; display: flex; align-items: center; gap: 4px; padding: 2px; margin-top: 3px; border: 3px solid #eedbbd; border-radius: 12px; background: #fff; }
.peek-item > svg { flex: none; pointer-events: none; }
.peek-item .recipe { pointer-events: none; gap: 1px; }
.peek-item .ri-station, .peek-item .ri-word { display: none; }
.peek-item .ri-row { border: none; padding: 0 2px; min-height: 24px; }
.peek-item .ri svg { width: 22px; height: 22px; }
.peek.many .peek-item > svg { width: 40px; height: 40px; }
.peek.many .peek-item .ri svg { width: 18px; height: 18px; }
.peek-item.match { border-color: var(--good); background: #dff6e2; box-shadow: 0 0 0 3px rgba(63,174,91,.45); animation: matchPulse 0.6s ease-in-out infinite alternate; }
@keyframes matchPulse { to { box-shadow: 0 0 0 7px rgba(63,174,91,.2); } }
.peek-item.taken { opacity: 0.5; }
.peek-item.drop-over { transform: scale(1.06); border-color: var(--gold-2); background: #fff1b8; z-index: 2; }
.peek-ok { position: absolute; top: -6px; left: -6px; width: 24px; height: 24px; border-radius: 50%; background: var(--good); color: #fff; font-weight: 900; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; pointer-events: none; }
.peek-taken { position: absolute; bottom: 0; left: 4px; font-size: 11px; font-weight: 800; pointer-events: none; }
.fly-donut { position: absolute; filter: drop-shadow(0 8px 8px rgba(40,18,0,.4)); }
.line-ticket.got { animation: gulp 0.45s ease-out; box-shadow: 0 0 0 5px var(--good); }

/* בלי גלילה באף תחנה */
.note-items, .dough-slots, .fry-tray-list, .fin-cards, .station-finish .fin-tools, .sb-items { overflow: hidden; }
.dough-slots { flex-wrap: wrap; align-content: center; gap: 6px; }
.dough-tray.crowded .dough-loose { width: 56px; height: 56px; border-width: 2px; }
.dough-tray.crowded .dough-loose svg { width: 46px; height: 46px; }
.dough-tray.crowded .warn-badge { width: 18px; height: 18px; font-size: 13px; }
.fry-tray-list.grid { display: grid; grid-template-columns: 1fr 1fr; align-content: start; gap: 4px; }
.fry-tray-list.grid.g3 { grid-template-columns: 1fr 1fr 1fr; }
.fry-tray-list.grid .fry-tray-item { justify-content: center; padding: 1px; }
.fry-tray-list.grid .fti-text { display: none; }
.fry-tray-list.grid.g3 svg { width: 46px; height: 46px; }
.station-finish .fin-loose .fin-card { flex: 0 1 66px; min-width: 0; }
.station-finish .fin-loose .fin-card svg { width: 100%; max-width: 52px; }
.station-finish .fin-loose.many { gap: 2px; padding: 4px; }
.station-finish .fin-loose.many .fin-card { padding: 0; border-width: 1px; }
.station-finish .fin-loose.many .fin-card-num { display: none; }

/* גימור: ארון קטן יותר, ומדים אנכיים ליד הסופגניה */
.station-finish .fin-tools { height: auto; max-height: 376px; }
.fin-opt svg { width: 54px; height: 48px; }
.fin-tab { padding: 2px; }
.fin-actions { margin-top: 4px !important; }
.fin-meters { position: absolute; left: 8px; top: 8px; width: 108px; height: 376px; z-index: 4; pointer-events: none; }
.fin-meters .fin-gauges { height: 100%; flex-direction: row; justify-content: center; gap: 3px; background: rgba(255,248,236,.95); border: 3px solid #c98b52; border-radius: 16px; padding: 6px 4px; }
.fin-meters .fin-gauges:empty { display: none; }
.fin-gauge { flex: 1; min-width: 0; max-width: 48px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.fin-gauge-val { margin: 0; font-size: 15px; font-weight: 900; line-height: 18px; white-space: nowrap; }
.fin-meters .fin-meter { flex: 1; width: 100%; max-width: 30px; height: auto; border-radius: 12px; }
.fin-meters .fin-meter > i { top: auto; left: 0; right: 0; bottom: 0; width: auto; height: 0; border-radius: 0 0 10px 10px; transition: height .08s linear; }
.fin-meters .fin-meter > .meter-zone { top: auto; left: 0; right: 0; width: auto; border: none; border-top: 3px solid var(--good); border-bottom: 3px solid var(--good); z-index: 2; }
.fin-gauge-foot { display: flex; flex-direction: column; align-items: center; font-size: 11.5px; font-weight: 800; line-height: 1.1; text-align: center; min-height: 52px; }
.fin-none { align-self: center; font-weight: 800; text-align: center; }

/* מה עכשיו */
.shift-worker { display: none; }
#now-hint { position: absolute; left: 6px; bottom: 3px; width: 224px; height: 60px; z-index: 30; display: flex; align-items: center; gap: 6px; padding: 2px 6px; font-family: var(--font); color: var(--cocoa); text-align: right; background: #fff8ec; border: 3px solid var(--gold-2); border-radius: 18px; cursor: default; }
#now-hint.elsewhere { cursor: pointer; animation: attnHint 0.8s ease-in-out infinite alternate; }
@keyframes attnHint { to { box-shadow: 0 0 0 5px rgba(246,196,69,.7); } }
#now-hint.urgent { border-color: var(--bad); background: #ffe9e5; animation: blink 0.5s steps(2, start) infinite; }
#now-hint > svg { flex: none; }
.nh-body { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-width: 0; }
.nh-body b { font-size: 15px; line-height: 1.15; }
.nh-icons { display: inline-flex; gap: 3px; }
.dough-jar.want, .dough-cutter.want { animation: wantPulse 0.55s ease-in-out infinite alternate; }
@keyframes wantPulse { from { filter: drop-shadow(0 0 0 var(--good)); } to { filter: drop-shadow(0 0 9px var(--good)) brightness(1.08); transform: scale(1.05); } }

/* מצב פשוט (קל / ימים ראשונים) */
.fg-zone.gold { background: rgba(246, 196, 69, .75); border-color: var(--gold-3); }
.fry-card.simple .fg-wrap:not(.active) { display: none; }
.fry-card.simple .fg { height: 38px; border-radius: 19px; }
.fin-warn { position: absolute; left: 140px; top: 14px; width: 360px; z-index: 6; pointer-events: none; text-align: center; padding: 6px 10px; background: var(--bad); color: #fff; font-size: 20px; font-weight: 900; border: 3px solid #fff; border-radius: 999px; opacity: 0; }
.fin-warn.on { opacity: 1; animation: blink 0.4s steps(2, start) 4; }
.fin-work.driz-bad { filter: drop-shadow(0 0 14px var(--bad)); }

.peek-card.n4 .peek-item > svg { width: 42px; height: 42px; }
.peek-card.n4 .peek-item { margin-top: 2px; padding: 0; }
.peek-card.n4 .ri-row { min-height: 21px; }
.peek-card.n4 .ri svg { width: 19px; height: 19px; }
.dough-tray.crowded .dough-loose { width: 46px; height: 46px; }
.dough-tray.crowded .dough-loose svg { width: 38px; height: 38px; }
.dough-tray.crowded .dough-slots { gap: 4px; }
.station-finish .fin-loose.many { left: 170px; width: 596px; height: 86px; top: 482px; flex-wrap: wrap; justify-content: center; align-content: center; }
.station-finish .fin-loose.many .fin-card { flex: none; width: 46px; height: 38px; }
.station-finish .fin-loose.many .fin-card svg { width: 36px; height: 34px; }
.fin-gauge-foot { white-space: nowrap; }
#now-hint { width: 212px; left: 4px; }

/* ארבע סופגניות בפתק, בלי לחתוך */
.order-note.n4 .note-items { gap: 2px; }
.order-note.n4 .note-item { padding: 1px 2px; border-top-width: 1px; }
.order-note.n4 .note-pics { width: 40px; }
.order-note.n4 .note-pics > svg { width: 40px; height: 40px; }
.order-note.n4 .note-now { width: 34px; height: 34px; margin-top: 0; }
.order-note.n4 .note-now svg { width: 28px; height: 28px; }
.order-note.n4 .recipe { gap: 1px; }
.order-note.n4 .ri-row { padding: 0 2px; }
.order-note.n4 .ri svg { width: 20px; height: 20px; }
.order-note.n4 .ri-word { font-size: 12px; line-height: 20px; }

/* קרדיט לחיץ */
.credit-link { color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.credit-link:hover { color: #a8843f; }
a.about-logo { cursor: pointer; transition: transform .12s; }
a.about-logo:hover { transform: scale(1.05); }
.about-site { text-decoration: none; margin: 0 0 8px; border-color: #a8843f; color: #141c31; }
.modal-about { max-height: 700px; }
.about-logo { width: 120px; height: 120px; }
.about-logo img { width: 94px; }

/* ============================ סבב 5 ============================ */
/* גימור: סדר על השיש */
.station-finish .fin-work { height: 480px; }
.station-finish .fin-svg { margin-top: -14px; }
.fin-meters { top: 96px; height: 288px; left: 14px; width: 112px; }
@keyframes finBob { from { transform: translate(440px, 180px); } to { transform: translate(440px, 202px); } }
.station-finish .fin-loose, .station-finish .fin-loose.many, .station-finish .fin-loose:not(:has(.fin-card)) { opacity: 1; left: 296px; top: 468px; width: 428px; height: 90px; background: transparent; border: none; justify-content: center; align-content: center; flex-wrap: wrap; }
.station-finish .fin-loose.drop-over { box-shadow: 0 0 0 5px var(--good); border-radius: 14px; }
.station-finish .fin-loose .fin-sep { border: none; font-size: 17px; color: #8d5a33; }
.station-finish .fin-loose.many .fin-card { width: 46px; height: 40px; flex: none; }
.station-finish .fin-empty { margin: 90px 130px 50px; }

/* בצק ברור */
.ri.swatch { display: inline-block; border-radius: 46% 46% 40% 40%; border: 2.5px solid; box-shadow: inset 0 3px 0 rgba(255,255,255,.45); }
.dough-word { font-size: 13px; }
.order-note.n3 .dough-word, .order-note.n4 .dough-word { font-size: 12px; }
.peek .dough-word { display: none; }
.peek-item .ri-row:first-child .ri svg, .peek-item .ri-row:first-child .ri.swatch { width: 30px; height: 30px; }
.peek-item .ri-row:first-child { min-height: 32px; }

/* הרבה פתקים: שתי שורות, ומציגים מה שקובע התאמה (צורה ובצק) בגדול */
.peek.dropping.rows { flex-wrap: wrap; align-content: flex-start; row-gap: 6px; }
.peek.rows .peek-card { flex: 0 0 168px; }
.peek.rows .peek-head span { display: none; }
.peek.rows .peek-item > svg { width: 36px; height: 36px; }
.peek.rows .peek-item { margin-top: 2px; padding: 1px 2px; }
.peek.rows .peek-item .ri-row:nth-child(n+2) { display: none; }
.peek.rows .peek-item .ri-row:first-child .ri svg, .peek.rows .peek-item .ri-row:first-child .ri.swatch { width: 32px; height: 32px; }

#order-line.crowded .lt-donuts svg { width: 17px; height: 17px; margin: 0 -2px; }
#order-line.crowded { gap: 4px; padding-left: 4px; padding-right: 4px; }

/* מטרה יומית, הישגים, חג ולקוחות מיוחדים */
.hud-rank { width: 130px; }
.rank-title { display: none; }
.hud-rank-top { justify-content: center; }
.hud-goal { width: 172px; height: 62px; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 3px 8px; line-height: 1.1; text-align: center; }
.hud-goal small { font-size: 11px; font-weight: 800; color: #9a7650; }
.hud-goal b { font-size: 12.5px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.hud-goal.done { background: #dff6e2; border-color: var(--good); }
.hud-goal.failed { opacity: .6; }
.goal-bar { position: relative; display: block; height: 7px; border-radius: 7px; background: #e9dcc2; overflow: hidden; flex: none; }
.goal-bar i { position: absolute; top: 0; bottom: 0; right: 0; background: var(--good); border-radius: 7px; }
.modal-ach { width: 900px; max-width: 900px; max-height: 690px; }
.ach-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ach { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #fff; border: 2.5px solid #eedbbd; border-radius: 14px; }
.ach-star { font-size: 38px; line-height: 1; color: #d9c7a6; }
.ach.done { border-color: var(--gold-2); background: #fff7dd; }
.ach.done .ach-star { color: var(--gold); text-shadow: 0 2px 0 var(--gold-3); }
.ach-text { flex: 1; display: flex; flex-direction: column; gap: 2px; line-height: 1.2; }
.ach-text b { font-size: 17px; }
.ach-text small { font-size: 13px; font-weight: 600; color: #8a5a2e; }
.op-news { margin: 6px auto 0; width: max-content; max-width: 100%; padding: 3px 16px; background: #fff3dc; border: 2px solid #e8c079; border-radius: 999px; font-weight: 800; font-size: 16px; }
.op-news.holiday { background: #2b4a8a; border-color: var(--gold); color: #fff1cf; }
.op-news.goal { background: #dff6e2; border-color: var(--good); }
.sv-bonus { background: #fff1b8; border: 2px solid var(--gold-2); border-radius: 999px; padding: 2px 12px; font-weight: 800; font-size: 15px; }
.note-guest { text-align: center; font-weight: 800; font-size: 13px; color: #fff; background: #6a4bc4; border-radius: 8px; padding: 1px 6px; }
.menu-tag { position: absolute; top: -2px; left: 4px; font-size: 10.5px; font-weight: 800; background: #2b4a8a; color: #fff1cf; border-radius: 8px; padding: 0 6px; }
.note-item { position: relative; }
.order-holiday .flame { animation: flame 0.5s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 50% 100%; }

.sb-item { position: relative; }
.ach .achievement-icon { flex: none; }

/* מסך פתיחת היום כבר מציג את הכל: ההודעות הקופצות לא מכסות אותו */
#stage:has(.modal-open) #toast-layer { display: none; }

/* חותכנים: גם 7 (חנוכה) בשורה אחת, בלי לחרוג */
.dough-cutters-row { min-width: 0; gap: 5px; }
.dough-cutter { flex: 1 1 0; width: auto; max-width: 118px; min-width: 0; padding: 0 2px; }
.dough-cutter small { white-space: normal; line-height: 1.05; text-align: center; font-size: 12px; }
.dough-cutter svg { max-width: 100%; height: 48px; }
.ach { padding: 5px 12px; }
.modal-ach .ach-grid { gap: 6px; }

.tag-row { display: inline-flex; gap: 2px; margin-inline-start: auto; }
.line-ticket .tag-row { position: absolute; bottom: -9px; left: 50%; transform: translateX(-50%); margin: 0; pointer-events: none; }

/* ============================ סבב 6 ============================ */
.fin-meters { top: 150px; height: 220px; left: 18px; width: 96px; }
@keyframes finBob { from { transform: translate(416px, 210px) scale(.75); } to { transform: translate(416px, 228px) scale(.75); } }
/* מגש הגימור מופיע רק כשיש בו משהו, או בזמן גרירה (להחזרה מהקופסה) */
.station-finish .fin-loose:not(:has(.fin-card)) { opacity: 0; }
body.dragging .station-finish .fin-loose { opacity: 1; background: rgba(255,248,236,.85); border: 3px dashed #c98b52; border-radius: 14px; }
.station-finish .fin-loose:has(.fin-card) { background: rgba(213,221,228,.9); border: 3px solid #9fb0bf; border-radius: 16px; }

.peek.dropping.rows .peek-card { flex: 0 0 166px; }
.peek.dropping.rows { column-gap: 5px; padding: 0; }
.peek.rows .peek-head b { font-size: 18px; }

/* חנות בלי גלילה */
.modal-shopv { width: 900px; max-width: 900px; max-height: 700px; overflow: hidden; }
.shop-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.shop-tabs { display: flex; gap: 8px; }
.shop-tab { font-family: var(--font); font-size: 21px; font-weight: 900; color: var(--cocoa); padding: 6px 28px; background: #fff; border: 3px solid #eedbbd; border-radius: 999px; cursor: pointer; }
.shop-tab.active { background: linear-gradient(#ffe27a, var(--gold)); border-color: #fff3b8; box-shadow: 0 3px 0 var(--gold-3); }
.shop-cash { display: flex; align-items: center; gap: 8px; font-size: 24px; }
.shop-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; min-height: 468px; align-content: start; }
.shop-card { display: flex; flex-direction: column; align-items: center; gap: 2px; height: 150px; padding: 6px 10px; text-align: center; background: #fff; border: 3px solid #eedbbd; border-radius: 16px; line-height: 1.15; }
.shop-card > svg { flex: none; }
.shop-card b { font-size: 16px; }
.shop-card small { font-size: 12px; font-weight: 600; color: #8a6a48; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 28px; }
.shop-card .btn-small { padding: 3px 20px; margin-top: auto; }
.shop-card.owned { background: #effaf0; border-color: #bfe0c4; }
.shop-card.locked { opacity: .6; filter: grayscale(.6); }
.sc-owned { margin-top: auto; color: var(--good); font-weight: 900; }
.sc-locked { margin-top: auto; font-size: 13px; font-weight: 800; }

/* ============================ סבב 7 ============================ */
.station-finish .fin-work { height: 504px; }
.station-finish .fin-loose, .station-finish .fin-loose.many { top: 488px; height: 80px; }
@keyframes finBob { from { transform: translate(416px, 236px) scale(.75); } to { transform: translate(416px, 254px) scale(.75); } }

/* 9 פתקים ומעלה: שתי שורות, מספר גדול ומד סבלנות */
#order-line.two-rows { flex-wrap: wrap; align-content: center; justify-content: flex-start; row-gap: 5px; column-gap: 4px; padding: 4px 6px 2px; }
#order-line.two-rows::before { display: none; }
#order-line.two-rows .line-ticket { flex: 0 0 56px; width: 56px; height: 35px; padding: 3px 5px 4px; justify-content: space-between; border-radius: 4px 4px 8px 8px; transform: none; animation: none; }
#order-line.two-rows .line-ticket::before, #order-line.two-rows .lt-donuts, #order-line.two-rows .tag-row { display: none; }
#order-line.two-rows .line-ticket .lt-num { font-size: 18px; line-height: 18px; }
#order-line.two-rows .line-ticket .pbar { height: 7px; }
#order-line.two-rows .line-ticket.active { transform: scale(1.1); }

/* בצק קריא בפריסת הפתקים: דוגמית חזקה עם שם */
.peek .ri.swatch { border-width: 3px; filter: saturate(1.7) brightness(.93); }
.peek .dough-word { display: inline; font-size: 13px; font-weight: 800; }
.peek.rows .peek-item .ri-row:first-child .ri-icons { flex-wrap: nowrap; gap: 3px; }
.peek.rows .peek-item .ri-row:first-child .ri svg, .peek.rows .peek-item .ri-row:first-child .ri.swatch { width: 28px; height: 28px; }
.peek.rows .peek-item .dough-word { font-size: 11.5px; }

/* צד נא */
.sv-donut { position: relative; }
.sv-donut.raw { outline: 4px solid var(--bad); }
.sv-raw { position: absolute; bottom: -4px; padding: 0 12px; background: var(--bad); color: #fff; border-radius: 999px; font-size: 17px; animation: popIn .3s cubic-bezier(.2,1.8,.4,1) .6s backwards; }
.station-finish .fin-loose.many { top: 478px; height: 90px; row-gap: 2px; padding: 2px; }

/* משלוח מנות (פורים) */
.station-finish .fin-box.mishloach { filter: drop-shadow(0 0 10px #a96bd6); }
.station-finish .fin-box .mm-basket { position: absolute; right: -6px; top: -34px; pointer-events: none; }
.station-finish .fin-box.mishloach .fin-handle { border-color: #7a3fb0; background: #f3e6ff; white-space: nowrap; }
.sv-box.mishloach, .box-ghost.mishloach { background: linear-gradient(#e7d0fa, #c49ae6); border-color: #7a3fb0; }
.sv-box.mishloach { align-items: center; }
.note-mishloach { display: flex; align-items: center; justify-content: center; gap: 6px; background: #7a3fb0; color: #fff; border-radius: 8px; font-size: 15px; padding: 0 6px; flex: none; }

.shop-card { height: 166px; padding: 4px 10px 6px; }
.shop-card.locked { filter: none; opacity: .85; }
.shop-cards { min-height: 514px; }
.modal-shopv { padding-top: 10px; padding-bottom: 12px; }
.modal-shopv .modal-title { margin-bottom: 4px; font-size: 26px; }
.modal-shopv .modal-buttons { margin-top: 6px; }
.shop-top { margin-bottom: 6px; }
.shop-card small { display: block; min-height: 0; -webkit-line-clamp: unset; font-size: 11.5px; line-height: 1.15; overflow: visible; } .shop-card { gap: 1px; } .shop-card b { font-size: 15.5px; } .shop-card .btn-small { padding: 2px 20px; font-size: 14px; }

/* ============================ סבב 8 ============================ */
canvas.static-layer { pointer-events: none; }
.order-wait { pointer-events: none; }
.order-wait .cust-node { pointer-events: all; }

/* 9+ פתקים: רואים מה הוזמן בלי לרחף */
#hud.many-tickets .hud-rank { display: none; }
#order-line.two-rows .line-ticket { flex: 0 0 90px; width: 90px; height: 37px; display: grid; grid-template-columns: auto 1fr; grid-template-rows: 1fr 7px; column-gap: 2px; align-items: center; padding: 2px 3px 3px; }
#order-line.two-rows .lt-donuts { display: flex; grid-column: 2; grid-row: 1; justify-content: center; height: 24px; }
#order-line.two-rows .lt-donuts svg { opacity: 1; margin: 0 -2px; }
#order-line.two-rows .lt-donuts svg.has { filter: drop-shadow(0 0 3px var(--good)) drop-shadow(0 0 2px var(--good)); }
#order-line.two-rows .line-ticket .lt-num { grid-column: 1; grid-row: 1; font-size: 13px; }
#order-line.two-rows .line-ticket .pbar { grid-column: 1 / -1; grid-row: 2; }

/* גימור: מדף למד, וצנצנות על השיש */
.fin-meter-shelf { position: absolute; left: 6px; top: 372px; width: 122px; height: 15px; background: linear-gradient(#d69a62, #a86a3a); border: 3px solid #7d4a22; border-radius: 6px; box-shadow: 0 8px 8px rgba(60,30,5,.3); z-index: 3; }
.fin-meter-shelf::after { content: ''; position: absolute; left: 20px; right: 20px; top: 12px; height: 12px; border-left: 7px solid #7d4a22; border-right: 7px solid #7d4a22; }
.fin-shelf { position: absolute; left: 172px; top: 492px; width: 592px; height: 76px; z-index: 2; display: flex; justify-content: center; align-items: flex-end; gap: 3px; padding: 0 6px 6px; border-bottom: 9px solid #a86a3a; border-radius: 4px; }
.fin-jar { flex: 0 1 60px; min-width: 0; height: 66px; padding: 0; display: flex; align-items: flex-end; justify-content: center; background: transparent; border: 3px solid transparent; border-radius: 14px; cursor: pointer; transition: transform .12s; }
.fin-jar svg { max-width: 100%; }
.fin-jar:hover { transform: translateY(-5px) scale(1.06); }
.fin-jar.sel { background: rgba(255,236,170,.6); border-color: var(--gold-2); }
.station-finish.has-loose .fin-shelf { left: 440px; width: 324px; gap: 0; }
.station-finish .fin-loose, .station-finish .fin-loose.many { left: 172px; width: 260px; top: 482px; height: 86px; }
.station-finish.has-loose .fin-jar { flex-basis: 40px; }

/* מגש ריק לא חוסם את הצנצנות (חוזר להיות פעיל בזמן גרירה) */
.station-finish .fin-loose:not(:has(.fin-card)) { pointer-events: none; }
body.dragging .station-finish .fin-loose:not(:has(.fin-card)) { pointer-events: auto; }
#order-line.two-rows .line-ticket { flex-basis: 82px; width: 82px; } #order-line.two-rows { column-gap: 4px; padding: 3px 4px 1px; }

.station-finish.has-loose .fin-loose .fin-card, .station-finish.has-loose .fin-loose.many .fin-card { flex: none; width: 46px; height: 38px; padding: 0; border-width: 1px; }
.station-finish.has-loose .fin-loose .fin-card svg { width: 36px; height: 34px; }
.station-finish.has-loose .fin-loose .fin-card-num, .station-finish.has-loose .fin-loose .fin-sep { display: none; }
.station-finish.has-loose .fin-loose { flex-wrap: wrap; align-content: center; gap: 2px; padding: 2px; }
.station-finish.has-loose .fin-loose.many .fin-card { width: 27px; height: 38px; }
.station-finish.has-loose .fin-loose.many .fin-card svg { width: 25px; height: 30px; }
.station-finish.has-loose .fin-loose.many { gap: 1px; }

/* סרגל עליון שעומד גם בסכומים גדולים */
.hud-money { white-space: nowrap; padding: 4px 8px; min-width: 96px; direction: rtl; }
#hud.many-tickets { gap: 6px; padding: 0 8px; }
#hud.many-tickets .hud-money { font-size: 18px; gap: 4px; min-width: 0; }
#hud.many-tickets .coin { width: 16px; height: 16px; }
#hud.many-tickets .hud-goal { width: 140px; }
#hud.many-tickets .hud-day { width: 100px; }
#order-line { overflow: visible; }
#order-line.two-rows .line-ticket { flex: 0 0 calc(16.66% - 4px); width: auto; min-width: 0; }
#order-line.two-rows .lt-donuts { min-width: 0; }
#order-line.two-rows .lt-donuts svg { flex: 0 1 auto; min-width: 0; }
#order-line.two-rows .line-ticket.active { transform: none; box-shadow: 0 0 0 3px var(--gold), 0 3px 6px rgba(0,0,0,.4); }

/* קישור לגרסת הרשת */
.web-link { font-size: 14px; }
.modal-about .web-link { display: block; width: fit-content; margin: 0 auto 6px; }
