.g7{font-family:Tahoma,Arial,sans-serif;color:var(--ui-text-e6eef6,#e6eef6);max-width:1320px;margin:auto;padding:20px;box-sizing:border-box}.g7 *{box-sizing:border-box}.g7 button,.g7 select{font:inherit;min-height:44px}.g7-header{display:flex;align-items:center;gap:12px;justify-content:space-between}.g7-header>div{min-width:0;flex:1}.g7-header h1{font-size:clamp(17px,2vw,24px);line-height:1.4;margin:3px 0}.g7-header small{font-size:12px;color:var(--ui-text-9cb5ca,#9cb5ca);display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.g7-header button{flex:none}.g7-lessons{display:grid;gap:12px;margin-top:24px;grid-template-columns:repeat(2,minmax(0,1fr))}.g7-lessons button{display:flex;gap:16px;align-items:center;text-align:start;padding:20px;border-radius:16px;background:var(--ui-bg-142b40,#142b40);border-color:var(--ui-border-294760,#294760)}.g7-lessons button>span{font-size:25px;color:var(--ui-text-e8bd71,#e8bd71);background:var(--ui-bg-243d53,#243d53);border-radius:12px;padding:15px}.g7-lessons strong{font-size:17px;line-height:1.7}.g7-lessons small{display:block;font-size:13px;margin-top:6px;color:var(--ui-text-9eb7c9,#9eb7c9)}.g7-experience{height:var(--official-view,100dvh);max-width:none;display:grid;grid-template-rows:54px auto minmax(0,1fr) 22px;gap:8px;padding:10px 14px;overflow:hidden}.g7-tabs{display:flex;gap:7px;overflow-x:auto;min-width:0;scrollbar-width:thin;white-space:nowrap;max-height:48px}.g7-tabs button{font-size:13px;padding:7px 14px;flex:none;min-height:38px}.g7-tabs .active,.g7 button[aria-pressed=true]{background:#d8b36c;color:#142738;border-color:#e6c88f}.g7-workspace{display:grid;grid-template-columns:minmax(0,1fr) 250px;direction:ltr;gap:12px;min-height:0;min-width:0}.g7-stage{direction:rtl;display:flex;flex-direction:column;min-width:0;min-height:0;border:1px solid #9aaebb;background:#eef2f5;border-radius:16px;overflow:hidden;color:#243e50}.g7-hint{font-size:13px;line-height:1.45;padding:9px 13px;color:#526a7d;flex:none;background:#f7f9fb}.g7-canvas{position:relative;flex:1;min-height:0;min-width:0;overflow:hidden;background:radial-gradient(ellipse at 50% 45%,#fff,#e6ecf0)}.g7-canvas svg{width:100%;height:100%;display:block;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;direction:ltr}.g7-object,.g7-pin{cursor:pointer}.g7-object[data-drag]{cursor:grab}.g7-object:focus-visible,.g7-pin:focus-visible{outline:none;filter:drop-shadow(0 0 6px #c88e2d)}.g7-zoom{position:absolute;bottom:8px;left:8px;display:flex;gap:4px}.g7-zoom button{font-size:17px;min-width:40px;min-height:40px;padding:4px 9px;background:#fffE;border-color:#bbc9d2;color:#24485f;box-shadow:0 2px 7px #1232}.g7-notice{font-size:13px;text-align:center;color:#934427;background:#fff9e9;flex:none}.g7-notice:not(:empty){padding:7px}.g7-parts{display:flex;gap:8px;overflow-x:auto;padding:8px;background:#fff;flex:none;border-top:1px solid #d8e2e9;direction:rtl;min-height:94px}.g7-parts button{min-width:104px;max-width:130px;display:grid;grid-template-columns:42px 1fr;grid-template-rows:1fr auto;gap:4px;background:#f3f6f8;color:#284456;border:1px solid #cedce4;border-radius:10px;padding:7px;touch-action:none;user-select:none;-webkit-user-select:none}.g7-parts img{width:42px;height:55px;object-fit:contain;grid-row:1/3;pointer-events:none}.g7-parts span{font-size:12px;line-height:1.4;align-self:center}.g7-parts small{font-size:10px;color:#627e8f}.g7-parts .installed{opacity:.45;border-style:dashed}.g7-toolbox{direction:rtl;background:var(--ui-bg-142b3f,#142b3f);border:1px solid var(--ui-border-2c475d,#2c475d);border-radius:14px;overflow:hidden;min-height:0;display:flex;flex-direction:column}.g7-toolhead{display:flex;align-items:center;justify-content:space-between;padding:8px;border-bottom:1px solid var(--ui-border-294458,#294458);gap:8px}.g7-toolhead button{font-size:13px;padding:7px 12px;min-height:38px}.g7-controls{display:flex;flex-direction:column;gap:13px;padding:14px;overflow-y:auto;min-height:0;overscroll-behavior:contain}.g7-controls>button{font-size:14px}.g7-controls label{display:grid;gap:8px;font-size:13px;color:var(--ui-text-bdd0df,#bdd0df)}.g7-controls select{width:100%;min-width:0;font-size:14px}.g7-range span{display:flex;justify-content:space-between;gap:6px}.g7 input[type=range]{padding:0;min-height:38px;width:100%;accent-color:var(--ui-text-dfb770,#dfb770);direction:ltr;touch-action:pan-y}.g7 button:disabled{opacity:.38;cursor:default}.g7-segment{display:flex;gap:5px}.g7-segment button{flex:1;min-width:0;font-size:13px;padding:9px 5px}.g7-sound{display:grid;gap:6px;border-top:1px solid var(--ui-border-36526a,#36526a);padding-top:10px}.g7-sound button{font-size:13px}.g7-guide{font-size:13px;color:var(--ui-text-abc9de,#abc9de);text-align:center;padding:8px}.g7-foot{font-size:11px;text-align:center;color:var(--ui-text-8ea8ba,#8ea8ba);line-height:20px;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.g7-toolbox.collapsed .g7-controls{display:none}.g7-toolbox.collapsed{align-self:start}
@media(max-width:700px) and (orientation:portrait){.g7{padding:10px}.g7-lessons{grid-template-columns:1fr}.g7-experience{padding:6px;gap:5px;grid-template-rows:48px auto minmax(0,1fr) 18px}.g7-header{gap:7px}.g7-header button{padding:7px 10px;min-height:40px;font-size:13px}.g7-header h1{font-size:15px}.g7-header small{font-size:10px}.g7-workspace{display:flex;flex-direction:column;gap:6px}.g7-stage{flex:1}.g7-hint{font-size:11px;padding:6px 9px}.g7-toolbox{flex:none;max-height:29dvh}.g7-toolhead{padding:5px}.g7-toolhead button{min-height:32px;font-size:12px;padding:5px 10px}.g7-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 12px;padding:9px}.g7-controls .g7-range,.g7-controls .g7-segment,.g7-sound,.g7-guide{grid-column:1/-1}.g7-controls .g7-sound{display:flex;align-items:center;gap:8px}.g7-sound input{flex:1;min-width:0}.g7-controls button{font-size:12px;min-height:38px;padding:6px}.g7-parts{padding:5px;gap:5px;min-height:75px}.g7-parts button{min-width:99px;grid-template-columns:32px 1fr;padding:5px}.g7-parts img{width:32px;height:48px}.g7-parts span{font-size:11px}.g7-zoom{bottom:5px;left:5px}.g7-zoom button{min-width:36px;min-height:36px;font-size:15px}.g7-tabs button{font-size:11px;min-height:32px;padding:5px 9px}.g7-foot{font-size:9px}}
@media(orientation:landscape) and (max-height:600px){.g7-experience{padding:4px 8px;gap:4px;grid-template-rows:36px auto minmax(0,1fr);height:var(--official-view,100dvh)}.g7-header{gap:8px}.g7-header small{display:none}.g7-header h1{font-size:14px;margin:0}.g7-header button{min-height:32px;padding:5px 10px;font-size:12px}.g7-tabs{max-height:32px}.g7-tabs button{min-height:29px;font-size:11px;padding:4px 9px}.g7-workspace{grid-template-columns:minmax(0,1fr) 190px;gap:6px}.g7-hint{font-size:10px;padding:4px 9px}.g7-foot{display:none}.g7-toolhead{padding:4px}.g7-toolhead button{min-height:30px;font-size:11px;padding:4px 7px}.g7-controls{gap:8px;padding:8px}.g7-controls>button{min-height:36px;font-size:12px;padding:6px}.g7-controls label{font-size:11px;gap:3px}.g7-controls select{min-height:34px;font-size:12px}.g7-parts{min-height:63px;padding:4px;gap:5px}.g7-parts button{grid-template-columns:30px 1fr;min-width:110px;padding:3px}.g7-parts img{height:44px;width:30px}.g7-parts span{font-size:10px}.g7-parts small{font-size:9px}.g7-zoom button{min-width:32px;min-height:32px;font-size:14px}.g7-zoom{bottom:4px;left:4px}}
@media(min-width:701px) and (orientation:portrait){.g7-workspace{grid-template-columns:minmax(0,1fr) 210px}.g7-controls{padding:10px}.g7-header h1{font-size:20px}}
/* Practical lesson: reference left, board centre, compact controls right. */
.g7-parts svg{width:52px;height:57px;flex:none;overflow:visible;pointer-events:none}.g7-parts button{touch-action:none;user-select:none;-webkit-user-select:none}.g7-reference{grid-column:3;grid-row:1;background:#fff;border:1px solid #b5cbd3;border-radius:16px;padding:12px;display:flex;flex-direction:column;gap:12px;justify-content:center;min-width:0;color:#284956;overflow:auto}.g7-reference img{width:100%;height:auto;object-fit:contain}.g7-reference strong{font-size:13px}.g7-reference small{text-align:center}.g7-experience[data-kind=board] .g7-workspace{grid-template-columns:minmax(0,1fr) 180px 220px}.g7-experience[data-kind=board] .g7-stage{grid-column:1;grid-row:1}.g7-experience[data-kind=board] .g7-toolbox{grid-column:2;grid-row:1}.g7-experience[data-kind=board] .g7-workspace{direction:rtl}.g7-pin text{font-weight:700;paint-order:stroke;stroke:#f3f8f8;stroke-width:3px;stroke-linejoin:round}.g7-object{touch-action:none}
@media(orientation:landscape) and (max-height:600px){.g7-experience[data-kind=board] .g7-workspace{grid-template-columns:minmax(0,1fr) 145px 165px}.g7-reference{padding:7px;border-radius:10px}.g7-reference strong{font-size:11px}.g7-controls{gap:7px}.g7-controls button{min-height:36px;font-size:12px}.g7-parts{height:60px!important;min-height:60px!important}.g7-parts button{min-width:110px}.g7-parts svg{width:36px;height:42px}}
@media(orientation:portrait) and (max-width:750px){.g7-experience[data-kind=board] .g7-workspace{display:grid;grid-template-columns:minmax(0,1fr) 105px;grid-template-rows:minmax(0,1fr) auto;gap:5px}.g7-experience[data-kind=board] .g7-stage{grid-column:1/3;grid-row:1}.g7-experience[data-kind=board] .g7-toolbox{grid-column:1;grid-row:2;max-height:24dvh}.g7-experience[data-kind=board] .g7-reference{grid-column:2;grid-row:2;padding:5px;max-height:24dvh}.g7-reference strong{font-size:10px}.g7-reference small{display:none}.g7-reference img{min-height:0;object-fit:contain}.g7-parts svg{width:42px;height:47px}}
.g7-parts svg{grid-row:1/3;max-width:100%}.g7-parts.complete{display:none}.g7-single-app{grid-template-rows:54px minmax(0,1fr) 22px}.g7-single-app .g7-tabs{display:none}
@media(max-width:700px) and (orientation:portrait){.g7-single-app{grid-template-rows:48px minmax(0,1fr) 18px}}
@media(orientation:landscape) and (max-height:600px){.g7-single-app{grid-template-rows:36px minmax(0,1fr)}}

/* Physical order is explicit and independent of Arabic text direction. */
.g7-experience[data-kind=board] .g7-workspace{direction:ltr;grid-template-columns:190px minmax(0,1fr) 195px}
.g7-experience[data-kind=board] .g7-reference{grid-column:1;direction:rtl}
.g7-experience[data-kind=board] .g7-stage{grid-column:2}
.g7-experience[data-kind=board] .g7-toolbox{grid-column:3}
.g7-reference-buttons{display:flex;gap:4px}.g7-reference-buttons button{flex:1;padding:5px;font-size:12px;color:#284956;background:#eaf1f3}
.g7-reference.expanded{position:fixed;inset:6vh 5vw;z-index:100;box-shadow:0 0 0 100vmax #081726bb;padding:20px;align-items:center}
.g7-reference.expanded img{flex:1;min-height:0;max-height:75vh;width:100%;object-fit:contain}
@media(orientation:landscape) and (max-height:600px){.g7-experience[data-kind=board] .g7-workspace{grid-template-columns:135px minmax(0,1fr) 155px}.g7-reference-buttons{flex-wrap:wrap}}
@media(orientation:portrait) and (max-width:750px){.g7-experience[data-kind=board] .g7-workspace{grid-template-columns:115px minmax(0,1fr)}.g7-experience[data-kind=board] .g7-stage{grid-column:1/3;grid-row:1}.g7-experience[data-kind=board] .g7-reference{grid-column:1;grid-row:2}.g7-experience[data-kind=board] .g7-toolbox{grid-column:2;grid-row:2}.g7-reference.expanded{max-height:none!important}}

/* No reserved schematic column after removing the theoretical preview. */
.g7-experience[data-reference=none] .g7-workspace{grid-template-columns:minmax(0,1fr) 250px}
.g7-experience[data-reference=none] .g7-stage{grid-column:1;grid-row:auto}
.g7-experience[data-reference=none] .g7-toolbox{grid-column:2;grid-row:auto}
@media(orientation:landscape) and (max-height:600px){.g7-experience[data-reference=none] .g7-workspace{grid-template-columns:minmax(0,1fr) 155px}}
@media(orientation:portrait) and (max-width:750px){.g7-experience[data-reference=none] .g7-workspace{display:flex;flex-direction:column}.g7-experience[data-reference=none] .g7-stage{flex:1}.g7-experience[data-reference=none] .g7-toolbox{flex:none;max-height:29dvh}}

/* Keep the board and tool pages together on phones, tablets and desktops. */
.g7-experience{height:var(--official-view,100vh);height:var(--official-view,100dvh);grid-template-rows:auto auto minmax(0,1fr) auto}
.g7-experience.g7-single-app{grid-template-rows:auto minmax(0,1fr) auto}
.g7-experience .g7-header button{white-space:nowrap}
.g7-experience .g7-toolbox{min-height:0}
.g7-experience .g7-controls.lab-control-deck{flex:1;padding:10px;min-height:0}
.g7-experience .lab-control-page>button{width:100%;font-size:13px;min-height:40px;padding:7px}
.g7-experience .lab-control-page label{min-width:0;gap:4px;font-size:12px}
.g7-experience .lab-control-page select{font-size:13px;min-height:38px;padding:6px}
.g7-experience .lab-control-page input[type=range]{min-height:32px;margin:0}
.g7-experience .lab-control-page .g7-sound{display:flex;flex-wrap:wrap;gap:5px}.g7-experience .g7-sound input{min-width:0;flex:1}
.g7-experience .g7-toolbox.collapsed .g7-controls{display:none}
@media(orientation:portrait) and (max-width:750px){
 .g7-experience .g7-workspace,.g7-experience[data-reference=none] .g7-workspace{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) minmax(205px,31vh);grid-template-rows:minmax(0,1fr) minmax(205px,31dvh);gap:6px}
 .g7-experience .g7-stage,.g7-experience[data-reference=none] .g7-stage{grid-column:1;grid-row:1;min-height:0}
 .g7-experience .g7-toolbox,.g7-experience[data-reference=none] .g7-toolbox{grid-column:1;grid-row:2;max-height:none;height:100%}
 .g7-experience .g7-toolhead{padding:5px}.g7-experience .g7-toolhead button{min-height:34px;font-size:12px}
 .g7-experience .g7-controls.lab-control-deck{padding:7px}
 .g7-experience .g7-parts{min-height:62px;height:62px!important;padding:4px}.g7-experience .g7-parts svg{width:34px;height:40px}.g7-experience .g7-parts button{min-width:105px}
 .g7-experience .g7-hint{font-size:12px;line-height:1.4}.g7-experience .g7-header h1{font-size:15px}
}
@media(orientation:landscape) and (max-height:600px){
 .g7-experience{grid-template-rows:auto auto minmax(0,1fr)}.g7-experience.g7-single-app{grid-template-rows:auto minmax(0,1fr)}
 .g7-experience[data-reference=none] .g7-workspace{grid-template-columns:minmax(0,1fr) 215px}
 .g7-experience .g7-header button{min-height:34px;font-size:12px}.g7-experience .g7-tabs button{font-size:12px;min-height:32px}
 .g7-experience .g7-hint{font-size:11px}.g7-experience .g7-controls.lab-control-deck{padding:7px}.g7-experience .lab-control-page>button{min-height:36px;font-size:12px}
}
.g7-experience.g7-no-tools .g7-toolbox{display:none}
.g7-experience.g7-no-tools .g7-workspace{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr)!important}
@media(orientation:portrait) and (max-width:750px){.g7-experience.tools-collapsed .g7-workspace{grid-template-rows:minmax(0,1fr) auto}.g7-experience.tools-collapsed .g7-toolbox{height:auto}}
