/* Shared PEGAS surfaces; no independent theme. Long Russian/Belarusian titles wrap. */
#instructionsContent,#instructionResults,.instruction-group,.instruction-grid,.instruction-card-copy{min-width:0;max-width:100%}
.instruction-card{box-sizing:border-box;height:auto;white-space:normal!important}
.instruction-card-copy>b,.instruction-card-copy>small,.instruction-card-copy>em{max-width:100%;white-space:normal!important;overflow-wrap:anywhere;word-break:normal}
.instruction-card-copy>small{display:block;-webkit-line-clamp:unset;overflow:visible}
.instruction-card-copy>b{font-size:14px;line-height:1.4}
.instruction-detail{box-sizing:border-box;width:min(94vw,480px);max-width:calc(100vw - 24px);max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 32px);overflow-y:auto;overflow-x:hidden}
.instruction-detail h2,.instruction-detail p,.instruction-detail strong{min-width:0;max-width:100%;overflow-wrap:anywhere;white-space:normal}
.instruction-detail h2{padding-right:28px;font-size:20px;line-height:1.3}
.instruction-detail li{display:grid;grid-template-columns:30px minmax(0,1fr)}
.instruction-demo{display:grid;gap:12px;padding:14px;border-radius:16px;background:var(--surface-soft);color:var(--on-surface);border:1px solid var(--line)}
.instruction-demo>header{display:grid;grid-template-columns:40px minmax(0,1fr);gap:10px;align-items:center}
.instruction-demo>header b,.instruction-demo>header small{display:block;overflow-wrap:anywhere;white-space:normal;line-height:1.4}
.instruction-demo>header b{font-size:13px}.instruction-demo>header small{font-size:11px;margin-top:3px;color:var(--muted)}
.instruction-demo-symbol{display:grid;place-items:center;width:40px;height:40px;border-radius:12px;background:var(--action);color:var(--on-action)}
.instruction-demo-symbol svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.instruction-demo .instruction-demo-progress{display:flex;gap:5px;margin:0}
.instruction-demo .instruction-demo-progress>span{display:block;grid-row:auto;width:auto;height:4px;min-height:4px;flex:1;border-radius:3px;background:var(--line)}
.instruction-demo .instruction-demo-progress>span.complete{background:var(--action)}
.instruction-demo .instruction-demo-screen{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;margin:0;padding:13px;border:1px solid var(--line);border-radius:13px;background:var(--surface)}
.instruction-demo-screen>.instruction-demo-step{display:block;grid-row:auto;width:auto;height:auto;border-radius:0;background:none;color:var(--action);font-size:11px;font-weight:700}
.instruction-demo-screen strong{font-size:14px;line-height:1.4}.instruction-demo-screen p{margin:0;font-size:13px;line-height:1.5;color:var(--on-surface)}
.instruction-demo footer{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.5fr);gap:8px}
.instruction-demo footer button{min-width:0;min-height:44px;height:auto;padding:10px 8px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--on-surface);font:inherit;font-size:12px;font-weight:700;white-space:normal;overflow-wrap:anywhere}
.instruction-demo footer button:last-child{background:var(--action);color:var(--on-action);border-color:var(--action)}
.instruction-demo footer button:disabled{opacity:.5}
.instruction-open-section{width:100%;min-height:48px;height:auto;white-space:normal!important;overflow-wrap:anywhere;margin-top:8px}
@media(max-width:390px){.instruction-card{grid-template-columns:48px minmax(0,1fr) 12px;gap:9px}.instruction-card-icon{width:48px;min-height:74px}.instruction-card-icon svg{width:29px;height:29px}}
