
/* ⚡ סימולטור המרות אנרגיה */
.ec{--ink:var(--ec-ink,#13295a);--acc:var(--ec-acc,#0f766e);max-width:1180px;margin:0 auto;padding:12px 16px 40px;color:#1f2937;font-size:1.05rem;line-height:1.6;overflow-wrap:anywhere}
.ec *{box-sizing:border-box}
.ec h1{color:var(--ink);font-size:clamp(1.5rem,4.2vw,2.3rem);line-height:1.25;margin:.2em 0 .3em}
.ec h2{color:var(--ink);font-size:clamp(1.25rem,3.2vw,1.6rem);margin:1.6em 0 .5em;display:flex;flex-wrap:wrap;gap:.4em;align-items:center}
.ec h3{color:var(--ink);font-size:1.15rem;margin:.6em 0 .3em}
.ec-crumbs{font-size:.95rem;margin:4px 0 8px;color:#475569}.ec-crumbs a{color:var(--ink)}
.ec-hero{background:linear-gradient(135deg,#fff7e6,#e9f5ff);border:2px solid var(--acc);border-radius:22px;padding:16px 18px;box-shadow:0 8px 24px rgba(20,40,80,.08)}
.ec-hero p{margin:.4em 0}.ec-small{font-size:.92rem;color:#475569}
.ec-stg{display:inline-block;background:var(--acc);color:#fff;border-radius:999px;padding:.1em .7em;font-size:.85rem;font-weight:700}
.ec-path{display:flex;flex-wrap:wrap;gap:6px;padding:0;margin:.6em 0;list-style:none}.ec-path li{background:#fff;border:1.5px solid #cbd5e1;border-radius:999px;padding:.15em .75em;font-size:.92rem}
.ec-box{background:#fff;border:1.5px solid #dbe3ee;border-radius:18px;padding:12px 16px;margin:12px 0;box-shadow:0 4px 14px rgba(20,40,80,.05)}
.ec-box.tip{background:#fffbea;border-color:#f5d36b}
.ec-links{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:12px;margin:14px 0}
.ec-links a{display:flex;gap:10px;align-items:center;background:#fff;border:2px solid var(--acc);border-radius:16px;padding:12px 14px;text-decoration:none;color:var(--ink);font-weight:700;min-width:0}
.ec-links a span.i{font-size:1.8rem;line-height:1}.ec-links a small{display:block;font-weight:400;color:#475569}
.ec-pick{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px;margin:10px 0}
.ec-pk{display:flex;gap:8px;align-items:center;text-align:right;background:#fff;border:2px solid #cbd5e1;border-radius:14px;padding:8px 10px;font:inherit;font-size:.95rem;cursor:pointer;color:#111827;min-height:48px}
.ec-pk .i{font-size:1.5rem}.ec-pk[aria-pressed=true]{border-color:var(--acc);background:#ecfdf5;box-shadow:0 0 0 3px rgba(15,118,110,.18)}
.ec-pk.done::after{content:'✔️';margin-inline-start:auto}
.ec-stagewrap{background:#fff;border:2px solid #dbe3ee;border-radius:20px;padding:10px;margin:8px 0}
.ec-scn-title{margin:.1em 0 .2em}.ec-story{margin:.1em 0 .5em}
.ec-cv{display:block;width:100%;height:auto;aspect-ratio:800/440;border-radius:14px;background:#f8fafc;touch-action:pan-y}
.ec-ctl{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0 2px}
.ec button{font:inherit;cursor:pointer}
.ec-ctl button,.ec-btns button,.ec-gb{background:#fff;border:2px solid #94a3b8;border-radius:12px;padding:.45em .9em;min-height:44px;color:#111827}
.ec-ctl button[aria-pressed=true],.ec-gb[aria-pressed=true]{background:#e0f2fe;border-color:#0369a1}
.ec-ctl .go,.ec-go{background:var(--acc)!important;color:#fff!important;border-color:var(--acc)!important;font-weight:700}
.ec button:focus-visible,.ec input:focus-visible,.ec select:focus-visible,.ec textarea:focus-visible,.ec a:focus-visible,.ec summary:focus-visible{outline:3px solid #f59e0b;outline-offset:2px}
.ec-big{position:fixed;inset:0;z-index:9999;overflow:auto;border-radius:0;padding:16px 3vw;background:#fff}
.ec-big .ec-cv{max-height:72vh;width:auto;max-width:100%;margin:0 auto}.ec-big .ec-story,.ec-big .ec-scn-title{font-size:1.5rem}
.ec-howto{margin:.3em 0 .6em}
.ec-tray{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 12px;padding:10px;background:#f1f5f9;border-radius:14px}
.ec-card{--tc:#334155;background:#fff;border:2.5px solid var(--tc);color:#111827;border-radius:12px;padding:.4em .75em;font-weight:700;min-height:44px;touch-action:none;user-select:none}
.ec-card[aria-pressed=true]{background:var(--tc);color:#fff}
.ec-ghost{position:fixed;z-index:10000;pointer-events:none;opacity:.9;box-shadow:0 8px 20px rgba(0,0,0,.25)}
.ec-chain{display:flex;flex-wrap:wrap;align-items:stretch;gap:6px}
.ec-stage{flex:1 1 140px;min-width:130px;background:#fff;border:2px dashed #94a3b8;border-radius:16px;padding:8px;display:flex;flex-direction:column;gap:6px;position:relative}
.ec-num{position:absolute;top:-10px;inset-inline-start:-6px;background:#b45309;color:#fff;border-radius:50%;width:26px;height:26px;display:grid;place-items:center;font-weight:700;font-size:.9rem}
.ec-body{font-weight:700;color:var(--ink);padding-inline-start:16px;line-height:1.3}
.ec-slot{--tc:#94a3b8;border:2.5px dashed var(--tc);border-radius:12px;background:#f8fafc;min-height:48px;padding:.3em .5em;color:#475569}
.ec-slot.full{border-style:solid;background:#fff;color:#111827;font-weight:700}
.ec-slot.over{background:#fef3c7;border-color:#f59e0b}
.ec-slot.ok{box-shadow:0 0 0 3px #16a34a}.ec-slot.bad{box-shadow:0 0 0 3px #dc2626}
.ec-arrow{flex:0 0 auto;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:4px;border-radius:12px}
.ec-arr{font-size:1.6rem;line-height:1;color:#475569}
.ec-ab{display:flex;flex-direction:column;gap:4px}
.ec-ab-b{background:#fff;border:2px solid #94a3b8;border-radius:10px;padding:.15em .5em;font-size:.9rem;min-height:36px}
.ec-ab-b[aria-pressed=true]{background:#1e3a8a;color:#fff;border-color:#1e3a8a}
.ec-arrow.ok{background:#dcfce7}.ec-arrow.bad{background:#fee2e2}
.ec-side{font-size:.95rem;color:#475569;margin:.6em 0}
.ec-btns{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0}
.ec-fb{min-height:1.6em}.ec-fb p{margin:.3em 0}.ec-yay{background:#ecfdf5;border:2px solid #16a34a;border-radius:12px;padding:.5em .8em}
#ec-prog{font-weight:700;color:var(--ink)}
.ec-defs{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:10px}
.ec-defs>div{background:#fff;border:1.5px solid #dbe3ee;border-radius:14px;padding:10px 12px}
.ec-types{display:flex;flex-wrap:wrap;gap:6px;margin:.4em 0}.ec-types span{border:2px solid var(--tc);border-radius:999px;padding:.1em .6em;font-weight:700;background:#fff}
.ec-orow{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:6px 0}
.ec-orow input,.ec-orow select,.ec input[type=text],.ec input[type=number],.ec textarea,.ec select{font:inherit;border:1.5px solid #94a3b8;border-radius:10px;padding:.35em .55em;min-height:42px;max-width:100%;background:#fff;color:#111827}
.ec-orow input{flex:1 1 180px}.ec-oarr{padding-inline-start:24px;color:#475569}
.ec textarea{width:100%}
.ec label.q{display:block;font-weight:700;margin:.5em 0 .2em}
.sr{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.ec-tw{overflow-x:auto;max-width:100%}
.ec table{border-collapse:collapse;width:100%;min-width:300px;background:#fff}
.ec th,.ec td{border:1.5px solid #cbd5e1;padding:.35em .5em;text-align:center}
.ec thead th{background:#eef2ff;color:var(--ink)}
.ec td input{width:100%;min-width:60px}
.ec-teacher{background:#f8fafc;border:2px solid #64748b;border-radius:16px;padding:6px 14px;margin:22px 0}
.ec-teacher summary{font-weight:700;color:var(--ink);cursor:pointer;padding:.4em 0;font-size:1.1rem}
.ec-teacher li{margin:.3em 0}
.ec-credit{text-align:center;color:#475569;font-size:.92rem;margin-top:24px}
/* משחק */
.ec-teams{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px;margin:10px 0}
.ec-team{border:3px solid var(--tc,#64748b);border-radius:16px;padding:8px;background:#fff;text-align:center}
.ec-team.turn{box-shadow:0 0 0 5px rgba(245,158,11,.45)}
.ec-team input{width:100%;text-align:center;font-weight:700;border:none;border-bottom:1.5px dashed #94a3b8;min-height:36px}
.ec-team .sc{font-size:2.2rem;font-weight:800;color:var(--tc,#111827);line-height:1.2}
.ec-team .pl{display:flex;gap:4px;justify-content:center;flex-wrap:wrap}.ec-team .pl button{border:2px solid var(--tc,#64748b);background:#fff;border-radius:10px;min-height:40px;min-width:44px;font-weight:700}
.ec-gcard{background:linear-gradient(135deg,#fff,#f0f9ff);border:3px solid var(--acc);border-radius:24px;padding:18px;text-align:center;margin:10px 0;min-height:240px;display:flex;flex-direction:column;justify-content:center;gap:8px}
.ec-gcard .em{font-size:3.4rem;line-height:1}.ec-gcard .tx{font-size:clamp(1.3rem,3.6vw,2rem);font-weight:800;color:var(--ink)}
.ec-gcard .ask{color:#334155}
.ec-reveal{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:8px;font-size:1.25rem;font-weight:700}
.ec-reveal .p{border:3px solid var(--tc);border-radius:999px;padding:.1em .8em;background:#fff}
.ec-reveal .w{background:#1e3a8a;color:#fff;border-radius:12px;padding:.1em .7em}
.ec-timer{font-size:1.6rem;font-weight:800;color:#b45309}
.ec-chips{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}
.ec-chips span{border:2px dashed #64748b;border-radius:12px;padding:.25em .7em;background:#fff;font-weight:700}
.ec-chips.sol span{border-style:solid;border-color:var(--tc)}
.ec-game.ec-big .ec-gcard{min-height:50vh}.ec-game.ec-big .ec-gcard .tx{font-size:2.8rem}.ec-game.ec-big .ec-gcard .em{font-size:5rem}
/* רדיו */
.ec-meter{height:22px;border-radius:999px;background:#e2e8f0;overflow:hidden}.ec-meter i{display:block;height:100%;background:linear-gradient(90deg,#0e7490,#22d3ee);width:0;transition:width .2s}
.ec-units{display:flex;flex-direction:column;gap:8px}
.ec-ubar{display:flex;height:40px;border-radius:12px;overflow:hidden;border:2px solid #334155;background:#f8fafc}
.ec-ubar span{display:flex;align-items:center;justify-content:center;color:#fff;font-weight:700;font-size:.95rem;white-space:nowrap;overflow:hidden;min-width:0;transition:flex-basis .2s}
.ec-sum{font-weight:800;color:#166534}
.ec-graph{width:100%;max-width:640px;height:auto;aspect-ratio:640/320;background:#fff;border:1.5px solid #cbd5e1;border-radius:12px;display:block}
.ec-calc{display:grid;gap:10px}
.ec-calc .row{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.ec-calc input{width:90px}
.ec-ok{color:#166534;font-weight:700}.ec-no{color:#b91c1c;font-weight:700}
@media (max-width:640px){.ec{padding:8px 10px 30px;font-size:1rem}.ec-chain{flex-direction:column}.ec-stage{min-width:0;flex:1 1 auto}.ec-arrow{flex-direction:row;justify-content:flex-start;padding-inline-start:30px}.ec-arr{transform:rotate(-90deg)}.ec-ab{flex-direction:row}.ec-pick{grid-template-columns:1fr 1fr}.ec-pk{font-size:.88rem;padding:6px 8px}}
@media print{.ec-ctl,.ec-btns,.ec-tray,.ec-pick,.ec-cv{display:none!important}.ec-teacher{display:none}}
@media (prefers-reduced-motion:reduce){.ec *{transition:none!important}}
